3 ACTION RESULT YOUR POINTS THEIR POINTS
4 Tell the truth Win +2 -3
5 Tell the truth Lose -3 +4
6 Tell the truth Tie +3 +3
13 Your agent class should at the very least provide the following:
15 points = 0 # Will be kept updated by the supervisor. No point modifying it.
16 children = 0 # Will also be kept updated by the supervisor.
17 state = {} # You needn't actually keep state, and it certainly doesn't have to be a dictionary.
18 def Defend (self, foeName, foePromisedAttack): # foeName and foePromisedAttack are both strings.
19 return "Rock" # Not a very good idea, but this is the format you need to use.
20 def Attack (self, foeName): # Also note that the supervisor doesn't use named arguments.
21 return "Rock", "Paper" # Real first, then promised. Won't they be surprised!
22 def Results (self, foeName, isInstigatedByYou, winner, yourItem, theirItem, promisedItem, pointChange): # The second argument is a boolean.
23 pass # You probably want to store at least some of this information.
27 The syntax for input and output is as follows. Every line of input given by the supervisor must be replied with the correct response.
28 Segmentation fault is never the correct response :-). Rumour has it that if you just use Python, this won't happen.
30 The angle brackets (<>) indicate whether the line is output from the agent or input to it respectively, and are not part of the actual formatting.
32 Syntax for an attacking agent:
34 <ATTACKING itemToUse itemToPromise
37 <ATTACKING Paper Scissors
39 Syntax for a defending agent:
40 >DEFEND foeName foePromisedItem
43 >DEFEND agent00001 Scissors
46 Syntax for collecting results:
47 >RESULTS foeName isInstigatedByYou winner yourItem theirItem promisedItem pointChange
50 >RESULTS agent00001 False Attacker Rock Paper Scissors -2
53 Syntax for cleaning up after your bot - either the round has ended, or you've been killed off
55 {program exits without responding}