Problem 772. TRON Tourney 000 : Clockwise Wall Hugger
TRON Tournament is based upon the excellent TRON Challenge, Cody 327, created by Alfonso Nieto-Castanon.
I will implement, as practical, winning Player TRON-bots as Host TRON-bots.
The Passing criteria is changed to Wins - Ties/4 > Losses.
The 100 Matches will be "even" as Host and Player will play the same 50 paired starting positions.
The Host TRON-bot will be provided in the function template. It is highly recommend to run the initial TRON bot so that the player can copy the Test Suite for his bot creation. The Test Suite code has beautiful graphics created by Alfonso.
The TRON arena is fixed at 50x50.
Please visit the Cody 327 link for any info I may miss.
Board: 50x50
Wall: -3 (Rows 1 and 50, Columns 1 and 50)
Player: 1
Host: 2
Player created wall: -1
Host created wall: -2
Empty Spaces: 0
Players start on either row 2 or column 2
Players move simultaneously and thus a crash to the same spot is a tie.
Running into walls is a loss.
Simultaneous wall crashing is a tie.
Given the board with its coverage make a Move, "NESW".
"N" idx-1; "E" idx+50, "S" idx+1, and "W" is idx-50.
Input: Board
Output: (string 1 character) eg "N"
Score: Perfect Score is 0 points (200-Wins*2-Ties/2)
The Test Suite has some very nice methods to implement checks.
Bot 000 is Alfonso's Clockwise Exterior Wall Hugger
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers6
Suggested Problems
-
15767 Solvers
-
92 Solvers
-
Back to basics 8 - Matrix Diagonals
924 Solvers
-
Replace all zeros and NaNs in a matrix with the string 'error'
99 Solvers
-
184 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!