1 Wouldn't it be nice to do the programming competition again this year? I have
2 an idea that's simple enough for the non-programmer to have a good chance at
3 winning yet allows deep complexity for anyone keen to get their hands dirty.
7 My idea is inspired by the classic iterated Prisoner's Dilemma problem in game
8 theory. The premise is to write an "agent" to survive and thrive in the morally
9 bankrupt RockPaperScissors (RPS) land.
11 Your agent spends its life in a dystopian RPS underworld, where at any moment
12 another agent could pick a fight with it, after which your agent is obliged to
13 pick a fight with yet another. In RPS battle, the instigating agent gets a
14 chance (which he must use) to tell the truth or lie about which tool he is
15 going to use (rock, paper, or scissors). Agents start off with 10 points, and
16 gain and lose points when they win, lose and tie a round depending on the
17 circumstances of the fight. The points table is in the technicalities
20 http://shmookey.ucc.asn.au/technicalities
22 Synopsis: if an agent gets picked on for a fight and told rock, paper or
23 scissors, it can either get modest but mutually beneficial points by trying to
24 cause a tie, but risk being slaughtered by the other if it's lying (with a
25 small amount of points awarded if it wins "by accident"), or it can try to win
26 based on that information and get big points for exploiting the other agent
27 with a relatively small punishment for being "tricked" and losing (and no point
28 change in case of an "accidental" tie).
30 Thus, in any single round there are bigger rewards and smaller consequences in
31 "attacking" the rock, paper or scissors that the enemy agent claims it will
32 use, but cooperation leads to mutual benefit and good agents should turn
33 against agents that try to exploit them.
35 If the agent loses all its points, it dies. If it reaches 20 points, it forms a
36 new agent and both return to 10 points. The agent can remember who it has
37 battled in the past and what the other agent has done, but it has no way of
38 communicating this to any other agent, and any "children" of the agent don't
43 The object of the game is for the descendants of your agent to be the dominant
44 species in an evolutionarily stable environment. The environment is declared
45 evolutionarily stable when the proportions of species populations remains the
46 same (with a tolerance of 5%) over ten thousand iterations, or if there is only
47 once species remaining, or if the judges say so.
49 There will be a prize for the winner consisting of whatever we can scrounge up
50 plus a special certificate you can keep forever and frame and love. Entrants
51 whose species survive to evolutionary stability will also receive a
56 The cost of entry per person is $3 for UCC members and $5 for everyone else.
57 Your entry may contain one (1) agent and you may only enter once. UCC reserves
58 the right to withdraw any agent without refund if it causes technical or
59 administrative difficulty, after a reasonable attempt at resolution is made.
61 Non-Programmers and Beginners
62 -----------------------------
63 There will be simple sample agents available that demonstrate how easy it
64 is to turn your idea into code. If you're able to visualise your idea as a
65 series of instructions you might tell a small child, you'll be able to
66 make it into an agent.
68 If you don't understand the next section, don't worry, modifying the samples to
69 do your bidding will work just as well as writing your agent from scratch.
73 The challenge will be operated by a supervisor module that picks the fights in
74 a "fair" way such that each agent gets to fight every other agent (supposing no
75 agents die) and each agent gets to see battle as frequently as possible. The
76 supervisor will be able to do any number of iterations in one go, after which
77 statistics can be gathered before doing the next set of iterations.
79 The easiest way to create an agent is with Python. Python is a popular
80 scripting language with a simple, easy to pick up syntax that resembles
81 pseudocode, and is well-adapted to this kind of task. Another advantage to
82 using Python is that the supervisor can talk to the agent directly, and the
83 programmer will not have to worry about maintaining state or validating input
84 and output. A Python agent should be a class that implements at least the
85 specification laid out in the technicalities document:
87 http://shmookey.ucc.asn.au/technicalities
89 The supervisor will store the number of points the agent has and the
90 number of children for your convenience. Your module may use any resource
91 available in the standard Python distribution. You are expected to use
92 member variables of your class to keep state.
94 You can use any language you like for your agent, really. Interfacing to
95 non-python agents is via stdin/stdout, so your language's builtin print and
96 read functions will work, but beware: if an agent makes a single mistake in its
97 input or output, the supervisor will declare it insane - which in
98 RockPaperScissors land carries the death penalty. The format of the input and
99 output is documented in the technicalities document:
101 http://shmookey.ucc.asn.au/technicalities
103 The agent is run once per instance and is expected to maintain its own state.
104 Not maintaining state correctly could lead to a very confused agent, left
105 wondering why it's not dead, or why the baby hasn't come. Don't leave your
108 A sample agent in Python, Java and C will be provided. Your agent does not have
109 to be open-source, but it must be submitted as source-code to prevent cheating.
110 If the agent is not in Python, build instructions must also be submitted.