diff --git a/doc/POINTS.txt b/doc/POINTS.txt new file mode 100644 index 0000000000000000000000000000000000000000..e5857cc4c67f3e44c1e423b900939b2bbdfde6a1 --- /dev/null +++ b/doc/POINTS.txt @@ -0,0 +1,9 @@ +POINTS.txt: The points table. + +WINNER TRUTH/LIE ATTACKER POINTS DEFENDER POINTS +Attacker Lie 3 -3 +Attacker Truth 2 -2 +Defender Lie -2 2 +Defender Truth -3 3 +Tie Lie 0 0 +Tie Truth 1 1 diff --git a/doc/README.txt b/doc/README.txt index 2616460e56e27cebe8ce9419bb1e27828f05d3a6..79cbce751929e6e1620c66edb11d1f7b65a622b8 100644 --- a/doc/README.txt +++ b/doc/README.txt @@ -4,11 +4,12 @@ Congratulations, you've found the documentation! - WELCOME.txt: A general introduction to the competition. - HOWTO.txt: A guide to getting the software you need to compete, and making your first baby steps towards competing. + - POINTS.txt: The points table. - JUDGING.txt: An insight into the capricious and arbitrary mind of the organiser on how your agent will be judged. - http://progcomp.ucc.asn.au/Rules : the rules of the competition - http://progcomp.ucc.asn.au/FAQs : Frequently Asked Questions - http://progcomp.ucc.asn.au/More%20Info : General Info - NOTES.txt: possibly important stuff that doesn't fit anywhere else. - INTERNALS.txt: Internal information which might interest you but which you shouldn't rely upon. - - UNSUPPORTED.txt: How to use a language that isn't Python, C/C++, Java or Octave/Matlab. + - UNSUPPORTED.txt: The wire protocol - useful for debugging. Also contains details on how to use a language that isn't Python, C/C++, Java or Octave/Matlab. - LICENSE: the terms under which the code is released to you. \ No newline at end of file diff --git a/doc/UNSUPPORTED.txt b/doc/UNSUPPORTED.txt index 02317e8c1b3a1f6a8733816bd29bd107ceabef8a..fb73fca055edc0f079080506bd18ee72cf446b92 100644 --- a/doc/UNSUPPORTED.txt +++ b/doc/UNSUPPORTED.txt @@ -1,4 +1,38 @@ -UNSUPPORTED.txt: You should not need this file. +UNSUPPORTED.txt: This file describes the wire protocol. You should only need this if you're debugging an external agent, or if you're interested in writing an agent in an unsupported language. -Consult the website. -FIXME: more info? \ No newline at end of file +If you are interested in using an unsupported language, consult the website for details on how to check with the organiser first. + +=== Wire protocol === + +The syntax for input and output is as follows. Every line of input given by the supervisor must be replied with the correct response. +Segmentation fault is never the correct response :-). Rumour has it that if you just use Python, this won't happen. + +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. + +Syntax for when your agent is spawned: +>HI uuid + +Syntax for an attacking agent: +>ATTACK foeName +<ATTACKING itemToUse itemToPromise +Example: +>ATTACK agent00002 +<ATTACKING Paper Scissors + +Syntax for a defending agent: +>DEFEND foeName foePromisedItem +<DEFENDING itemUsed +Example: +>DEFEND agent00001 Scissors +<DEFENDING Rock + +Syntax for collecting results: +>RESULTS foeName isInstigatedByYou winner yourItem theirItem promisedItem pointChange +<OK +Example: +>RESULTS agent00001 False Attacker Rock Paper Scissors -2 +<OK + +Syntax for cleaning up after your bot - either the round has ended, or you've been killed off +>BYE +{program exits without responding} \ No newline at end of file diff --git a/issues.txt b/issues.txt index 80daf7ce4669a2dfd802096e5838e409ed23822d..512da50fabb83fde135908087e07a8a785727c4b 100644 --- a/issues.txt +++ b/issues.txt @@ -1,6 +1,6 @@ - number of agents can spiral out of control very quickly, e.g. if Wash and Angel start duking it out. * Need to make supervisor smart enough to kill montonically increasing sequences. - - points table doesn't agree with technicalities doc + - agents die after MAX_AGE fights, not MAX_AGE rounds - code seems to trust you not to monkey around with your stats...? - coding styles are inconsistent throughout diff --git a/technicalities.txt b/technicalities.txt deleted file mode 100644 index 116543257a37e6098e18b69e8a70b2e9426e6903..0000000000000000000000000000000000000000 --- a/technicalities.txt +++ /dev/null @@ -1,55 +0,0 @@ -Points Table: - -ACTION RESULT YOUR POINTS THEIR POINTS -Tell the truth Win +2 -3 -Tell the truth Lose -3 +4 -Tell the truth Tie +3 +3 -Lie Win +4 -5 -Lie Lose -3 +3 -Lie Tie 0 0 - -Python Agents: - -Your agent class should at the very least provide the following: -class <AgentName>: - points = 0 # Will be kept updated by the supervisor. No point modifying it. - children = 0 # Will also be kept updated by the supervisor. - state = {} # You needn't actually keep state, and it certainly doesn't have to be a dictionary. - def Defend (self, foeName, foePromisedAttack): # foeName and foePromisedAttack are both strings. - return "Rock" # Not a very good idea, but this is the format you need to use. - def Attack (self, foeName): # Also note that the supervisor doesn't use named arguments. - return "Rock", "Paper" # Real first, then promised. Won't they be surprised! - def Results (self, foeName, isInstigatedByYou, winner, yourItem, theirItem, promisedItem, pointChange): # The second argument is a boolean. - pass # You probably want to store at least some of this information. - -Other Agents: - -The syntax for input and output is as follows. Every line of input given by the supervisor must be replied with the correct response. -Segmentation fault is never the correct response :-). Rumour has it that if you just use Python, this won't happen. - -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. - -Syntax for an attacking agent: ->ATTACK foeName -<ATTACKING itemToUse itemToPromise -Example: ->ATTACK agent00002 -<ATTACKING Paper Scissors - -Syntax for a defending agent: ->DEFEND foeName foePromisedItem -<DEFENDING itemUsed -Example: ->DEFEND agent00001 Scissors -<DEFENDING Rock - -Syntax for collecting results: ->RESULTS foeName isInstigatedByYou winner yourItem theirItem promisedItem pointChange -<OK -Example: ->RESULTS agent00001 False Attacker Rock Paper Scissors -2 -<OK - -Syntax for cleaning up after your bot - either the round has ended, or you've been killed off ->BYE -{program exits without responding} \ No newline at end of file