Links for simple game algorithms

I read this question and I remember the Wikipedia List of Algorithms . I know that Wikipedia also has a list of open source games, but what I want is links to simple game algorithms, even if they are 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 :)

+5
source share
6 answers

Most game algorithms are just search algorithms. In fact, you could say that AI is a search.

, - . Prolog.

Minimax, Minimax -.

Minesweeper NP-complete. .

+7

, "" , - , Life. - , , - /. - , , . , - > - > . , , , - .

+2

, Conway Game of Life. :

  • , - , .
  • , .
  • , , .
  • .

, .

+1

, , . , Bejeweled 8x8, 7 . , 8 . , , , ( ) , . , ? , , ?

+1

, , , , , - . (, :))

0

Here is the algorithm for most games:

After initializing the game ...

  • Accept user input
  • Update game state based on user input
  • Provide visual feedback (refresh screen)
  • Check for changes and update as needed
  • Check “play on top” and go to step 1 if the game is not finished yet.
  • Uh ... It's about that.

Hope this helps.

0
source

All Articles