Popular recipes tagged "game" but not "artificial_intelligence" and "beginner"http://code.activestate.com/recipes/tags/game-artificial_intelligence-beginner/2016-09-19T18:03:09-07:00ActiveState Code RecipesReversi Othello (Python) 2016-09-19T18:03:09-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/580698-reversi-othello/ <p style="color: grey"> Python recipe 580698 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/ai/">ai</a>, <a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/algorithms/">algorithms</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/games/">games</a>). </p> <p>Reversi/Othello Board Game using Minimax, Alpha-Beta Pruning, Negamax, Negascout algorithms.</p> Space Assault (Python) 2016-04-06T23:31:28-07:00Tage Burnetthttp://code.activestate.com/recipes/users/4193902/http://code.activestate.com/recipes/580636-space-assault/ <p style="color: grey"> Python recipe 580636 by <a href="/recipes/users/4193902/">Tage Burnett</a> (<a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/python/">python</a>). </p> <p>This is a game I created on Python without the use of Pygame</p> chroma (Python) 2016-05-30T11:48:10-07:00aaahttp://code.activestate.com/recipes/users/4194184/http://code.activestate.com/recipes/580671-chroma/ <p style="color: grey"> Python recipe 580671 by <a href="/recipes/users/4194184/">aaa</a> (<a href="/recipes/tags/2d/">2d</a>, <a href="/recipes/tags/game/">game</a>). </p> <p>Python personnal game code</p> Snake the game (Python) 2015-01-03T02:04:02-08:00Burak Tandoganhttp://code.activestate.com/recipes/users/4191373/http://code.activestate.com/recipes/578996-snake-the-game/ <p style="color: grey"> Python recipe 578996 by <a href="/recipes/users/4191373/">Burak Tandogan</a> (<a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/pygame/">pygame</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/snake/">snake</a>, <a href="/recipes/tags/the/">the</a>). Revision 3. </p> <p>Popular Snake game with Python-Pygame module. <strong>Important:</strong> If you try to run this script without special <strong>png-wav</strong> files it will fail, you have to put following files to a directory with this script. "apple.png","snakehead.png","intro.wav","dead.wav". They are basically apple picture, head of snake, intro sound and dead sound.Without them script will not run. Just make inactive the statements intro.wav and dead.wav, and find a little apple picture and snake head :).Or you can play the game just install it. <strong>Here is the installer:</strong> <a href="http://dosya.co/7c6f15c0f4d04514/Flafel-1.26-win32.rar" rel="nofollow">http://dosya.co/7c6f15c0f4d04514/Flafel-1.26-win32.rar</a> It will install the game in program files, you can find it in search "Flafel" and click to Flafel.exe. </p> high precision FPS (Python) 2015-05-12T12:04:38-07:00Jiri Justrahttp://code.activestate.com/recipes/users/4192188/http://code.activestate.com/recipes/579053-high-precision-fps/ <p style="color: grey"> Python recipe 579053 by <a href="/recipes/users/4192188/">Jiri Justra</a> (<a href="/recipes/tags/fps/">fps</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/games/">games</a>, <a href="/recipes/tags/pure/">pure</a>). Revision 2. </p> <p>This code adjust itself for set FPS value. It is much more precise that time.sleep fps implementation.</p> HANGMAN! (Python) 2015-09-21T20:49:41-07:00Burak Tandoganhttp://code.activestate.com/recipes/users/4191373/http://code.activestate.com/recipes/578984-hangman/ <p style="color: grey"> Python recipe 578984 by <a href="/recipes/users/4191373/">Burak Tandogan</a> (<a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/hangman/">hangman</a>, <a href="/recipes/tags/python/">python</a>). Revision 9. </p> <p>Classic Hangman on console, check how hang the man with codes! Click 'download' and left click the .py file, have fun!</p> Guess a number 2 (the computer attempts to guess your number) (Python) 2014-11-15T12:11:16-08:00Benoithttp://code.activestate.com/recipes/users/4191135/http://code.activestate.com/recipes/578963-guess-a-number-2-the-computer-attempts-to-guess-yo/ <p style="color: grey"> Python recipe 578963 by <a href="/recipes/users/4191135/">Benoit</a> (<a href="/recipes/tags/ai/">ai</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/sample/">sample</a>). Revision 2. </p> <p>Guess a number was part 1 was Human trying to guess a random number between 1 and 100 in 10 tries. This time the computer is trying to guess. Simple program for beginner to learn very simple formula as a start to an algorithm for AI. And conditional choice. The program is not perfect, as it will not force a victory when the computer guessed right, neither it can control if you cheated or not. But this is not the goal here. </p> Rock,Paper,Scissors (Python) 2014-12-19T05:39:38-08:00Burak Tandoganhttp://code.activestate.com/recipes/users/4191373/http://code.activestate.com/recipes/578983-rockpaperscissors/ <p style="color: grey"> Python recipe 578983 by <a href="/recipes/users/4191373/">Burak Tandogan</a> (<a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/paper/">paper</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/rock/">rock</a>, <a href="/recipes/tags/scissors/">scissors</a>). Revision 2. </p> <p>A simple game :)</p> Guess a number (Python) 2014-11-15T09:06:05-08:00Benoithttp://code.activestate.com/recipes/users/4191135/http://code.activestate.com/recipes/578962-guess-a-number/ <p style="color: grey"> Python recipe 578962 by <a href="/recipes/users/4191135/">Benoit</a> (<a href="/recipes/tags/function/">function</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/random/">random</a>, <a href="/recipes/tags/sample/">sample</a>). </p> <p>This is just a little game to explain some very basic function in Python for beginner. RANDOM, Loop, Try and except... </p> Python Game of Life (Python) 2014-01-14T14:34:17-08:00Christian Careagahttp://code.activestate.com/recipes/users/4186639/http://code.activestate.com/recipes/578808-python-game-of-life/ <p style="color: grey"> Python recipe 578808 by <a href="/recipes/users/4186639/">Christian Careaga</a> (<a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/pygame/">pygame</a>, <a href="/recipes/tags/python/">python</a>). </p> <p>Conway's Game of Life written in Python with Pygame!</p> <p>Here is a screenshot: <a href="http://adf.ly/c4cnA" rel="nofollow">http://adf.ly/c4cnA</a></p> <p>Here is the exe version!: <a href="http://adf.ly/c4bMO" rel="nofollow">http://adf.ly/c4bMO</a></p> <p>Hope you like it!</p> The game of Hangman in Python (Python) 2013-06-06T21:55:18-07:00Captain DeadBoneshttp://code.activestate.com/recipes/users/4184772/http://code.activestate.com/recipes/578551-the-game-of-hangman-in-python/ <p style="color: grey"> Python recipe 578551 by <a href="/recipes/users/4184772/">Captain DeadBones</a> (<a href="/recipes/tags/commandline/">commandline</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/python/">python</a>). </p> <p>Here is my version of the Game of Hangman in Python. I worte for my blog <a href="http://thelivingpearl.com/2013/06/06/the-game-of-hangman-in-python/">Captain DeadBones Chronicles</a></p> Conway's Game of Life In Python (Python) 2013-06-13T15:33:41-07:00alexander bakerhttp://code.activestate.com/recipes/users/4166679/http://code.activestate.com/recipes/578559-conways-game-of-life-in-python/ <p style="color: grey"> Python recipe 578559 by <a href="/recipes/users/4166679/">alexander baker</a> (<a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/life/">life</a>, <a href="/recipes/tags/numpy/">numpy</a>, <a href="/recipes/tags/of/">of</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/windows/">windows</a>). </p> <p>Conway's Game of Life In Python</p> Tic Tac Toe console game (Python) 2013-06-18T10:52:27-07:00Russel Walkerhttp://code.activestate.com/recipes/users/4186920/http://code.activestate.com/recipes/578563-tic-tac-toe-console-game/ <p style="color: grey"> Python recipe 578563 by <a href="/recipes/users/4186920/">Russel Walker</a> (<a href="/recipes/tags/ai/">ai</a>, <a href="/recipes/tags/console/">console</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/python/">python</a>). Revision 2. </p> <p>Just a simple text based Tic Tac Toe game for human vs computer play. </p> <p>The game and AI reside in the TTTGame class. AI uses brute force search for 'perfect play'.</p> <p>The CLI class provides a text based console user interface.</p> Random Maze Generator (Python) 2012-12-14T09:09:22-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578356-random-maze-generator/ <p style="color: grey"> Python recipe 578356 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/ai/">ai</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/pil/">pil</a>). Revision 2. </p> <p>Random maze generator using depth-first search.</p> <p>It starts the maze path from a random cell and there is no exit defined but actually any 2 cells on the path (white cells) can be assigned to be entry and exit locations. (I could just add code to randomly select 2 white cells and change their colors to something else but I thought it looks better this way.)</p> Random Multi-Maze Generator (Python) 2012-12-14T11:23:29-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578378-random-multi-maze-generator/ <p style="color: grey"> Python recipe 578378 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/ai/">ai</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/pil/">pil</a>). </p> <p>Randomly creates mazes which have multiple paths to solve. Entry and exit points for each path can be assigned arbitrarily. (I never seen this kind of maze anywhere before but I think calling them multi-maze should be okay.)</p> War Game (Version 5) (Python) 2012-12-07T01:40:06-08:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578369-war-game-version-5/ <p style="color: grey"> Python recipe 578369 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/card/">card</a>, <a href="/recipes/tags/demonstration/">demonstration</a>, <a href="/recipes/tags/game/">game</a>). </p> <p>Part of the War Game set, this version of War Game further advanced the program in an environment without curses. Showing another iteration of development, the recipe here program for more fun with a virtual card game and ASCII graphic card representations while playing.</p> War Game (Version 6) (Python) 2012-12-07T01:49:19-08:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578370-war-game-version-6/ <p style="color: grey"> Python recipe 578370 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/card/">card</a>, <a href="/recipes/tags/demonstration/">demonstration</a>, <a href="/recipes/tags/game/">game</a>). </p> <p>As the final version of the War Game, development finally came to a halt as the prototype exceeded it bounds for design. Yes, you can write your program as one large function, but should you? This recipe demonstrates that program without proper style can lead to a mess very quickly. Practice good coding standards, or you can easily loose focus and the ability to maintain your code.</p> Sudoku Game Generator (Python) 2012-09-14T17:07:50-07:00J W Jhttp://code.activestate.com/recipes/users/4181154/http://code.activestate.com/recipes/578250-sudoku-game-generator/ <p style="color: grey"> Python recipe 578250 by <a href="/recipes/users/4181154/">J W J</a> (<a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/sudoku/">sudoku</a>). Revision 3. </p> <p>Outputs difficult games with solutions.</p> War Card Game Simulation (Python) 2012-07-01T01:23:03-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578179-war-card-game-simulation/ <p style="color: grey"> Python recipe 578179 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/automatically/">automatically</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/simulation/">simulation</a>). </p> <p>After playing the card game with people for the first time, the game turned out to be rather boring. The way we played took absolutely no thought whatsoever and turned out to be very easy to automate. The game below is configured for four different players to complete the simple game until it ends. Each player's hand in printed, and the cards played in each round is shown till someone finishes. Whoever wins is shown at the end of the simulation, and the program quickly exits when complete.</p> A-star Shortest Path Algorithm (C++) 2010-12-25T23:36:35-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577457-a-star-shortest-path-algorithm/ <p style="color: grey"> C++ recipe 577457 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/algorithms/">algorithms</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/graph/">graph</a>, <a href="/recipes/tags/graphs/">graphs</a>, <a href="/recipes/tags/routes/">routes</a>). Revision 4. </p> <p>A-star (A*) is a shortest path algorithm widely used for RTS games, GPS navigation etc.</p>