astar_agent
- class rbgame.agent.astar_agent.Vertex(y, x, color='w', target=0, robot=None, mail=0, *, front=None, back=None, left=None, right=None)[source]
Bases:
objectSimilar to
Cell.- Parameters:
x (
int) – The abscissa in the graph. The coordinate origin is at the top left point, positive direction from left to right.y (
int) – The ordinate in the graph. The coordinate origin is at the top left point, positive direction from top to bottom.color (
str) – The color of the vertex. Possible colors are'w'- white,'b'- blue,'r'- red,'y'- yellow,'gr'- green,'g'- gray.target (
int) – The target of this vertex.robot (
Optional[VRobot]) – The located in this vertex robot.mail (
int) – Generated mail in this vertex.
- class rbgame.agent.astar_agent.Graph(colors_map, targets_map)[source]
Bases:
objectSimilar to
Board. It is set ofVertex.- Parameters:
- class rbgame.agent.astar_agent.VRobot(pos, battery=0, mail=0)[source]
Bases:
objectSimilar to
Robot.- Parameters:
- class rbgame.agent.astar_agent.AStarAgent(colors_map, targets_map, num_robots, maximum_battery=None)[source]
Bases:
BaseAgentA controller for single robot, using A* star search shortest path. See algorithm in Pure agent using A* path finding algorithm.
- Parameters: