Skip to content

zakwht/battlesnake-2018

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Battle Snake 2018

A simple BattleSnake written in Java. Entered in the 2018 Intermediate competition.

Strategy

Our snake's strategy was aggresive. For each turn, if the snake wasn't the largest on the board, or if the health was below a specific threshold, the snake would navigate towards the safest food. Otherwise, she would try to target other snakes' heads to either eliminate the opponent in a head-on collision or trap them by cutting off their path. The snake also included an unimplemented passive state, where she would try to loop back around to her tail to avoid collisions.

Drawbacks

The snake's biggest drawback was trapping itself in its own tail. We didn't implement an effective algorithm to calculate dangerous regions of the board, and ultimately the snake only died by running out of moves.

Battle History

Bounty Snakes:

The snake came third in our round of the battle. There were 57 competitors in the intermediate tier. The tournament can be viewed on Sendwithus' Twitch stream.

Screenshots

Screenshot #1 Screenshot #2 Screenshot #3 Screenshot #4

Acknowledgments