Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Links for simple game algorithms [closed]

I was reading that question and I remember of the Wikipedia list of algorithms. I know that Wikipedia have a list of Open Source games too, but what I want is a links for simple game algorithms, even if written in pseudocode.

As "simple" games, I mean games like Sudoku, Bejeweled, Solitaire, Minesweeper, Labyrinth, Snakes, Gorilla, Chess, Tetris, etc.

Bonus for C# source code :)

like image 471
Click Ok Avatar asked Feb 24 '09 01:02

Click Ok


1 Answers

Most game-playing algorithms are simply search algorithms. In fact, you could say that AI is search.

For Sudoku, dancing links is a good algorithm. Alternatively, it's solved very concisely in Prolog.

For chess, start with Minimax, then try Minimax with alpha-beta pruning.

Minesweeper is NP-complete. There aren't any known reliable and fast algorithms.

like image 74
Dan Dyer Avatar answered Oct 22 '22 00:10

Dan Dyer