#Tron Game
Write a Tron bot!
The aim of the game is to make as many moves on a grid as possible without moving onto a space that has already been occupied in the current game. If your bot is unable to make such a move, it loses the round.
##Game IO:
Your bot will be written in python and will create a class that inherits from BotSkeleton
.
from bot_skeleton import BotSkeleton
class BotName(BotSkeleton):
def __init__(self, no_bots, bot_id):
self.no_bots = no_bots
self.bot_id = bot_id
def make_move(self, board, positions):
my_position = positions[self.bot_id]
new_position = my_position[0] + 1, my_position[1]
return new_position
position
is a 2-long tuple containing 2 integers.positions
is aDict[bot_id, position]
board
can be indexed with aposition
.get_random_empty_pos() -> position
- returns a empty position at random in the boardposition_valid(position) -> bool
- returns if this move is valid (but not next to the position given)copy() -> List[List[int]
- returns a 2d list that can be modifiable of the current board stateEMPTY
- the id for an empty space- The value you return must be a
position
, and must also have a distance of 1 from this, not including diagonals.
Built in attributes for BotSkeleton
:
log
- contains a file object that you may write tono_bots
- the number of bots the game began withbot_id
- you're bot's id number.
##Tournament structure
- Unsure of structure
###General rules that I can't find better places for
- Your bot may NOT use any file storage except for write-only access to the log file provided
- Your bot must be written in Python 3. Sorry java people
- You may enter as many bots as you want
- Your bot must not attempt to subvert the game state
###I reserve the right to disqualify any bot from the competition (but shall only do so after telling you I will do so and you not making any changes required)
###You may download the controller here
##Results:
- Results here
##Sandbox notes:
- The number of players per match has yet to be chosen. I think 4 is a sensible number
- Should there be a minimum starting distance between players?
- How should the winner be determined?
- The bot that can win against as many other bots?
- The bot that makes the highest number of moves overall
- Something else?