next up previous
Next: Fitness Function Up: Evolving Agents: The Tron Previous: Evolving Agents: The Tron

  
Pseudocode of the foreground Tron server

1.
Start with an agent population A of 100 robots.

2.
For each \( a\in A \) let ca=0

3.
(Loop) 
While \( \min \{c_{a},a\in A\}<10 \), wait for events:

(a)
On event that a Java applet requests a game over the Internet, 
Select an agent \( a\in A \) with probability

\begin{displaymath}P(a)=\frac{w(a)}{\sum w(x),x\in A},\, w(a)=\max \{1,10-c_{a}\}\end{displaymath}

and send it to the applet.

(b)
On event that an applet reports the results of a game between human h and agent a,  
Save in database:  
Game result (win, tie, or lose); human id, agent id, time stamp, and list of moves. 
If \( a\in A \) then let ca=ca+1

4.
 Sort A according to fitness, \( A=a_{1},\ldots ,a_{100}, \)and let \( V=a_{1},\ldots ,a_{90} \)

5.
Fetch 10 new agents from novelty engine and call them R

6.
For each \( a\in V \) let ca=5. 
For each \( a\in R \) let ca=0 
Let \( A=V\cup R \)

7.
Go to (Loop)


next up previous
Next: Fitness Function Up: Evolving Agents: The Tron Previous: Evolving Agents: The Tron
Pablo Funes
2001-05-08