Skip to content

pramcodes/snake-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake AI - COMS II Snake Project (2023)

Welcome to the Snake AI repository! This project is part of the 2023 Wits COMS II Snake Project, where you can watch my snake compete on Watch my snake. As of the last update on 10/11/23, my snake is currently in the 6th league out of 48.

Overview

This coding project has undergone multiple modifications as I continuously refined my strategy to improve my snake's performance. Sometimes, I reused old functions in new strategy implementations, leading to a mix of different approaches.

Algorithms and strategy

Implemented a Breath first search to find the shortest part between the head of my snake and the apple. When no path is found the snake just found a safe empty square to move next. A empty cell was not occupied by another snake, an obstacle or my snake's body.

Project Evolution

The project evolved over time as I experimented with various strategies. Each modification aimed at enhancing the snake's decision-making and overall gameplay. While the code may seem disorganized in MyAgent.java, it reflects the iterative nature of the development process.

Repository Structure

  • MyAgent.java: The main source file containing the snake's logic and decision-making processes.
  • ... (other relevant files and directories)

Acknowledgements

I would like to express my gratitude to the Wits COMS II Snake Project organizers and participants for creating an engaging and competitive environment.

About

2023 wits COMS II snake project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages