Giter Club home page Giter Club logo

ann-ntnu's Introduction

Artificial Neural Networks visualization

This code implements a simple Neural Network that can be run on a graphical environment using pygame. This project implements 4 different agents: A greedy agent that follows simple rules (that can be used as baseline), an agent that learns by supervision of the greedy agent, an agent that learns by reinforcement, and a enhanced agent that learns by reinforcement but having more information about the surroundings.

The simulation window also includes a graphical representation of the neurons and their synapses, that changes live accordingly to the game progress: a green synapse means a positive connection between the input neuron and the output neuron (that input triggers the output) and a red synapse mean a negative connection (the input inhibits the output).

./report/img/input.png

The simulation can be controlled using the arrow keys to move step by step, or using SPC to run a game automatically. By pressing n a new board is randomly generated and loaded. By pressing t a visual training can be performed: the agent rapidly executes a batch of games and shows the evolution of the brain to the user. Since the visualization can be confusing with certain values of the connections, w can be used to print the weights in the terminal that is running the simulation in text format.

The src/ folder contains all the source code. To run it, just do: python3 src/run.py and you will be prompted with several options that were needed for the demo presentation. In the repository there is also a report that explained the details about the project as well as some study on the agents’ learning and performance.

./report/img/agents.png


This code was presented as the Project 1 for the course Bio-Inspired Artificial Intelligence (IT3708) @ NTNU (Spring 2017).

ann-ntnu's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

knut0815

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.