Create a solver for the classic arcade TRON game
Description
Your function should return the next move of your bike ('light cycle' if you prefer) for any given state of the board.
The board is described by a 50x50 matrix, with values:
0: empty space 1: your bike (bright blue dot on the figure above) 2: your opponents bike (bright red dot) -1: walls created by your bike (blue lines) -2: walls created by your opponents bike (red lines) -3: external walls (white)
Your bike's next move is described by a single character:
'N': moves up (next lower row) 'S': moves down (next higher row) 'W': moves west (next lower column) 'E': moves east (next higher column)
For each challenge, both bikes will start at a random position at the border of the board. Your solver will be called iteratively against a default solver (implementing a simple collision avoidance procedure). The last person standing after the other crashes against a wall is the winner. Your solver needs to be able to win 90 out of 100 challenges.
notes
For the purpose of collision detection both bikes are considered to move simultaneously for each iteration. A collision of the two bikes is considered a tie (not a win).
Whether you pass or not the tester will let you know how many wins/ties/looses your code accomplished against the default solver. Your score will be 100 - #Wins + #Looses (a score of 0 means you won all 100 challenges)
If you wish to display the challenges graphically copy and paste the evaluation code on your computer and change the first line to 'doDraw=true;'
Love the problem, love the graphics, great write-up, and great concept. awesome^2
Thanks!!
cool
98-1-1
99-0-1
91-2-7
W 97 t 1 looses 2
W 97 t 1 Looses 2
W 100 t 0 Looses 0 vs Base 327 bot
Crushes RAZ CCW Gap001 83 / 1 /16
RAZ CCW Gap allows max of 46 wins against bots to date 6/9/2012
Mid-Level Bot
W 98 t 1 L 1
Wins 898 Ties 1 Looses 1
Wins 100
Wins 100
wins 98 ties 1 looses 1
Generalized solution to any square board size >9
Wins 98 Ties 1 Looses 1
Wins 98 Ties 1 Looses 1
Size of 28? How'd you do this? Even the bot is more nodes than this.
95 1 4
97-1-2
98-1-1
92 wins; 1 ties; 7 looses. But certainly not the most concise...
91 wins; 1 ties; 8 losses
very sneaky!
Remove all the words that end with "ain"
1027 Solvers
4107 Solvers
Back to basics 9 - Indexed References
348 Solvers
354 Solvers
90 Solvers