forked from NicoGol/pontu_game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template_agent.py
37 lines (32 loc) · 848 Bytes
/
template_agent.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from agent import AlphaBetaAgent
import minimax
"""
Agent skeleton. Fill in the gaps.
"""
class MyAgent(AlphaBetaAgent):
"""
This is the skeleton of an agent to play the Tak game.
"""
def get_action(self, state, last_action, time_left):
self.last_action = last_action
self.time_left = time_left
return minimax.search(state, self)
"""
The successors function must return (or yield) a list of
pairs (a, s) in which a is the action played to reach the
state s.
"""
def successors(self, state):
pass
"""
The cutoff function returns true if the alpha-beta/minimax
search has to stop and false otherwise.
"""
def cutoff(self, state, depth):
pass
"""
The evaluate function must return an integer value
representing the utility function of the board.
"""
def evaluate(self, state):
pass