Skip to content

A collection of java AI agents that play the game Snake

Notifications You must be signed in to change notification settings

RadovicDanilo/JSnakeAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 JSnake AI - Snake Game with AI Agents

JSnake AI is a project featuring multiple AI agents designed to play and master the classic Snake game using different algorithms and strategies.


🚀 AI Agents Overview

1. 🌀 Single Hamiltonian Cycle

  • Follows a fixed Hamiltonian path, ensuring the snake never collides with itself.
    GIF1

2. ⚡ Hamiltonian Cycle with Shortcuts

  • Similar to the Hamiltonian path but takes shortcuts when possible to reach the food faster.
    GIF2

3. 🧭 BFS with Tail Following

  • Uses Breadth-First Search (BFS) to ensure the snake can always follow its tail, optimizing movement.
    GIF3

🔧 Technologies Used

  • Language: Java
  • Algorithms: Hamiltonian Cycle, BFS

🎯 Purpose

This project explores pathfinding, AI game strategies, and algorithm optimization by simulating AI agents in Snake. It was done as part of an Inteligent Systems course at RAF belgrade.

About

A collection of java AI agents that play the game Snake

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages