-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathStarterStrat.py
More file actions
24 lines (18 loc) · 821 Bytes
/
StarterStrat.py
File metadata and controls
24 lines (18 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from AntStrategy import AntStrategy
import random
class StarterStrat(AntStrategy):
"""An ant's strategy (brains) for moving during the game.
See superclass documentation for more about this class's methods and
attributes. This is a file you can copy to start making your own strategies.
"""
def __init__(self, max_x, max_y, anthill):
super().__init__(max_x, max_y, anthill) # Call constructor in superclass
def receive_info(self, messages):
"""Receive messages sent by teammates in the last round."""
pass
def send_info(self):
"""Send messages to teammates at the end of a round."""
return []
def one_step(self, x, y, vision, food):
'''Calculate and return a randomly chosen, but valid, next move.'''
return "PASS"