Skip to content

A stateless Battlesnake AI using Minimax with Alpha-Beta Pruning. Won second place in RBC AI snake competition

License

Notifications You must be signed in to change notification settings

billcui57/BattlesnakeW22

 
 

Repository files navigation

A minimax Battlesnake written in Typescript

Utilized the minimax algorithm to forecast and predict future game states. Complimented with alpha beta pruning to greatly reduce search space for optimal game path.

  • Second place in RBC's AI Snake competition

Other algorithms used

  • Flood filling to determine how much space the snake head has access to in each possible direction
  • A star to path find towards food

Game Replay

https://www.twitch.tv/videos/1422432127?t=00h57m00s

Screen Shot 2022-03-12 at 1 28 53 PM

  • In the screenshot above the minimax algorithm predicts several moves ahead that its tail would have moved out of the way after the snake has traversed the green path, allowing for it to escape.

About

A stateless Battlesnake AI using Minimax with Alpha-Beta Pruning. Won second place in RBC AI snake competition

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.8%
  • JavaScript 0.2%