agent
Defines how an agent is created, drawn and updated
Override the move
method to create a valid custom agent
Agent Objects
class Agent(ABC)
Abstract class that controls agents in the football game
Implement the move method to instantiate a valid agent
__init__
| __init__(id, team_id, pos, dir='L')
Initialize a player
Attributes:
id
int - Player's unique IDteam_id
int - ID of the team the player plays forpos
Point - The player's initial positiondir
string - The player's current direction (which way it faces). Either 'R' or 'L'
draw
| draw(win, cam, team_id, debug=False)
Draw the player as an animated sprite
Attributes:
win
pygame.display - Window on which to drawteam_id
int - Required to get the correct spritedebug
bool - Show additional info including the player's ID and the square used to approximate the player
update
| update(action, players)
Update player's (in-game) state based on his action
move
| @abstractmethod
| move(state_prev, state, reward)
Implement this method for a valid agent
Attributes:
state_prev
dict - The lsat to last game statestate
dict - The last game statereward
list - Reward returned from this state (Not implemented)
Should return a valid action