Menu

Tree [379136] master /
 History

HTTPS access


File Date Author Commit
 BUGS 2014-03-22 Nils Ulltveit-Moe Nils Ulltveit-Moe [d914b8] Initial commit
 README 2014-03-22 Nils Ulltveit-Moe Nils Ulltveit-Moe [d914b8] Initial commit
 frog.png 2014-03-22 Nils Ulltveit-Moe Nils Ulltveit-Moe [d914b8] Initial commit
 screenshot.png 2014-03-22 Nils Ulltveit-Moe Nils Ulltveit-Moe [d914b8] Initial commit
 snake.png 2014-03-22 Nils Ulltveit-Moe Nils Ulltveit-Moe [d914b8] Initial commit
 snakeBody.png 2014-03-22 Nils Ulltveit-Moe Nils Ulltveit-Moe [d914b8] Initial commit
 snakeCurve.png 2014-03-22 Nils Ulltveit-Moe Nils Ulltveit-Moe [d914b8] Initial commit
 snakeTail.png 2014-03-22 Nils Ulltveit-Moe Nils Ulltveit-Moe [d914b8] Initial commit
 snakespeed 2014-03-22 Nils Ulltveit-Moe Nils Ulltveit-Moe [379136] Added shellscript for startup and graceful exit
 snakespeed.png 2014-03-22 Nils Ulltveit-Moe Nils Ulltveit-Moe [d914b8] Initial commit
 snakespeed.py 2014-03-22 Nils Ulltveit-Moe Nils Ulltveit-Moe [d914b8] Initial commit

Read Me

SnakeSpeed game.

(C) Nils Ulltveit-Moe 2010-2014

The game is licenced under a BSD licence. Please use it, modify it or share it if you find it useful.

This is a variant of the well known snake game. The snakes are competing about
eating the frog. The game was implemented as a report for a course in 
Artificial Intelligence. My son helped me with the design using his toy snakes.

The game depends on PyGame and Rabbyt. On Ubuntu install with:

apt-get install python-pygame
apt-get install python-rabbyt

Different AI search methods can be used for different snakes:

-s human: Human controls the snake.
-s astarm: Snake with A* search with manhattan distance as heuristic (best).
-s astare: Snake with A* with Euclidian distance as heuristic.
-s astara: Snake with A* with the average of Euclidian and Manhattan distance.
-s dfs:    Snake with depth-first search.
-s bfs:    Snake with breadth-first search.

-l controls the length of the snake.

-i controls the percentage impassable blocks. A sensible value is -i 0.1, which
gives 10% impassable blocks.

-w width of playboard.
-h height of playboard.

The human controlled snake runs much faster than the AI snakes, to make the 
game more playable.

This is a proof-of-concept game. It is playable, but lacks more advanced functionality like different levels, sometimes the snakes get stuck etc.

The game was written when my son was 4. He still gives it a thumbs up now
that he is 7.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.