Git Product home page Git Product logo

ai-kido's Introduction

AI-Kido

AI-Kido is an NPC vs NPC fighter game implemented using the Python programming language and the Pygame library. This program was written for the CS 480 - Artificial Intelligence class at Truman State University.

Contributors:

Basic Explanation

AI-Kido is a figthing game in which we pit two computer players against one another. One NPC is implemented using random event generation while the other player is implemented using a nueral net and genetic algorithm.

Thorough Explanation

We are taking the NEAT (NeuroEvolutionary Augmented Topologies) approach. The way this algorithm will fit in with our game is similar to most games that NEAT is implemented in. There are a few crucial parts that are consistent with all implementations of NEAT, the fact that the agent is controlled by a neural network and that the neural network is modified by a genetic algorithm.

Our implementation is a game structure. This includes 2D physics and a game environment that supports players moving around. Our driver class (AI-Kido.py) will create a set of games (50 or so). These games will contain two players each, that start on opposite sides. These two enemies are contained within their own copy of a generic level that we created for all players to interact. Each player is controlled with a neural net defined within a “Genome.” The players look (take inputs into input nodes), think (forward propagates and determines outputs), and act (takes the last layer of output nodes and tells the players to act depending on which ones are active).

Once one player wins by getting to the opposite side sa many times as possible before the timer runs out (60 seconds), the players will be evaluated on their fitness level. It is at this point we run through the normal genetic algorithm involving: selection, crossover, and mutation. The players will fight previous (best) versions of themselves as they mutate to train. After numerous levels, our AI will have gained knowledge and will be able to beat previous versions of itself as well as put up a decent fight against itself.

Running the Program

  1. Download the repository
  2. Run AI-Kido.py

Background Image Source

The starting map for each game was grabbed from this site. All other background images were grabbed from this Imgur gallery. All sprites were hand drawn by Garrett Money and Patrick Morgan.

ai-kido's People

Contributors

gabriellewis avatar prmorgan 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.