chessai.student.tournament
1import chessai.core.action 2import chessai.core.agent 3import chessai.core.gamestate 4 5class TournamentAgent(chessai.core.agent.Agent): 6 """ 7 An agent that will compete in the tournament. 8 9 You are free to use any of the techniques learned throughout the course. 10 You may modify this agent however you wish, 11 including which agent it inherits from. 12 Remember that the tournament has strict time constraints. 13 """ 14 15 def game_start(self, 16 initial_state: chessai.core.gamestate.GameState) -> None: 17 # *** Your Code Here *** 18 super().game_start(initial_state) 19 20 def game_complete(self, 21 final_state: chessai.core.gamestate.GameState) -> None: 22 # *** Your Code Here *** 23 super().game_complete(final_state) 24 25 def get_action(self, state: chessai.core.gamestate.GameState) -> chessai.core.action.Action: 26 # *** Your Code Here *** 27 return chessai.core.action.NoneAction()
6class TournamentAgent(chessai.core.agent.Agent): 7 """ 8 An agent that will compete in the tournament. 9 10 You are free to use any of the techniques learned throughout the course. 11 You may modify this agent however you wish, 12 including which agent it inherits from. 13 Remember that the tournament has strict time constraints. 14 """ 15 16 def game_start(self, 17 initial_state: chessai.core.gamestate.GameState) -> None: 18 # *** Your Code Here *** 19 super().game_start(initial_state) 20 21 def game_complete(self, 22 final_state: chessai.core.gamestate.GameState) -> None: 23 # *** Your Code Here *** 24 super().game_complete(final_state) 25 26 def get_action(self, state: chessai.core.gamestate.GameState) -> chessai.core.action.Action: 27 # *** Your Code Here *** 28 return chessai.core.action.NoneAction()
An agent that will compete in the tournament.
You are free to use any of the techniques learned throughout the course. You may modify this agent however you wish, including which agent it inherits from. Remember that the tournament has strict time constraints.
16 def game_start(self, 17 initial_state: chessai.core.gamestate.GameState) -> None: 18 # *** Your Code Here *** 19 super().game_start(initial_state)
Notify this agent that the game is about to start. The state represents the initial state of the game. Any precomputation for this game should be done in this method. Calls to this method may be subject to a timeout.
21 def game_complete(self, 22 final_state: chessai.core.gamestate.GameState) -> None: 23 # *** Your Code Here *** 24 super().game_complete(final_state)
Notify this agent that the game has concluded. Agents should use this as an opportunity to make any final calculations and close any game-related resources.
26 def get_action(self, state: chessai.core.gamestate.GameState) -> chessai.core.action.Action: 27 # *** Your Code Here *** 28 return chessai.core.action.NoneAction()
Get an action for this agent given the current state of the game. This is simplified version of get_action_full(), see that method for full details.