cleanup
[progcomp10.git] / technicalities.txt
1 Points Table:
2
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
7 Lie             Win     +4              -5
8 Lie             Lose    -3              +3
9 Lie             Tie     0               0
10
11 Python Agents:
12
13 Your agent class should at the very least provide the following:
14 class <AgentName>:
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, yourItem, theirItem, promisedItem):      # The second argument is a boolean.
23                 pass                                    # You probably want to store at least some of this information.
24         
25 Other Agents:
26
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. 
29
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.
31
32 Syntax for an attacking agent:
33 >ATTACK foeName
34 <ATTACKING itemToUse itemToPromise
35 Example:
36 >ATTACK agent00002
37 <ATTACKING Paper Scissors
38
39 Syntax for a defending agent:
40 >DEFEND foeName foePromisedItem
41 <DEFENDING itemUsed
42 Example:
43 >DEFEND agent00001 Scissors
44 <DEFENDING Rock
45
46 Syntax for collecting results:
47 >RESULTS foeName didYouInstigate yourItem theirItem promisedItem pointChange childSpawned
48 <OK
49 Example:
50 >RESULTS agent00001 False Rock Paper Scissors -2 False
51 <OK
52
53 Syntax for cleaning up after your bot - either the round has ended, or you've been killed off
54 >BYE
55 {program exits without responding}

UCC git Repository :: git.ucc.asn.au