def __init__( self, index, timeForComputing = .1 ):
"""
Lists several variables you can query:
self.index = index for this agent
self.red = true if you're on the red team, false otherwise
self.agentsOnTeam = a list of agent objects that make up your team
self.distancer = distance calculator (contest code provides this)
self.observationHistory = list of GameState objects that correspond
to the sequential order of states that have occurred so far this game
self.timeForComputing = an amount of time to give each turn for computing maze distances
(part of the provided distance calculator)
"""
# Agent index for querying state
self.index = index
# Whether or not you're on the red team
self.red = None
# Agent objects controlling you and your teammates
self.agentsOnTeam = None
# Maze distance calculator
self.distancer = None
# A history of observations
self.observationHistory = []
# Time to spend each turn on computing maze distances
self.timeForComputing = timeForComputing
# Access to the graphics
self.display = None
评论列表
文章目录