Cody

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

55.56% Correct | 44.44% Incorrect
Last solution submitted on May 24, 2015
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Join the 15-year community celebration.

Play games and win prizes!

Learn more