Git Product home page Git Product logo

genetic-tetris-ai's Introduction

Genetric AI Tetris

Michael Germano August, 2016 Written in Python3.5

Python AI that can continually clear lines in the arcade game Tetris Built using the tetris terminal game from Eric Pai

Requirements

  • pyinput
  • numpy

Project Breakdown

  • ai.py:
    • analyzes gameboard, calculating all possible moves and subsequent moves based off of the current and next game piece.
    • calculates the score of each possible move based off of
      • lines formed
      • aggregate height
      • the number of holes
      • overall bumpiness
    • executes the best move
  • runAI.py:
    • script to start the game and AI
  • scoreConstants.py:
    • constants used to calculate the each move's score. These were found using the genetic algorithm.
  • geneticAlg:
    • Algorithm that continually improves a population of AI. Each organism in the population contains a list of 4 scoring constants. These constants are intially found randomly using a normal distribution. Every round, the best 50% of the AI breed randomly. Their offspring replace the worst 25% and the algorithm continues on.
  • tetris dir:
    • terminal tetris game created by Eric Pai

genetic-tetris-ai's People

Contributors

mpgermano avatar epai avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.