Welcome to our bird training simulator! Here you can observe the birds in real time, and use the genetic algorithm to train them to fly and eat food. Through the process of natural selection, this allows the best birds to survive and evolve over generations.

Overview

Flyoff

Flyoff is a project that uses Rust and WebAssembly (WASM) to train virtual birds to get the most food using a genetic algorithm and a custom neural network.

fly_vision.mp4

Prerequisites

  • Rust
  • wasm-pack
  • Node.js and npm

Installation

  1. Clone the repository: git clone https://github.com/ipriyam26/Flyoff.git
  2. Navigate to the project directory: cd Flyoff
  3. Build the project: wasm-pack build
  4. Link the project: wasm-pack link
  5. Install the npm dependencies: npm install

Usage

  1. Start the development server: npm run start
  2. Open http://localhost:8080/ in your browser to view the simulation.
  3. The birds will start to gather food using the Neural Network and Genetic Algorithm

Neural Network

The project uses a custom neural network architecture, which can be found in the src/nn directory. The network takes in the bird's current x and y position, as well as the positions of nearby food, and outputs a prediction for the bird's next move.

Genetic Algorithm

The project uses a genetic algorithm to train the neural network. Each bird has a set of weights for its neural network, and these weights are evolved over time by selecting the birds with the highest food gathering efficiency to breed and pass on their weights to the next generation.

Customization

You can change the parameters of the simulation and the Neural Network by modifying the config.js file

Contributing

If you're interested in contributing to Flyoff, please feel free to open a pull request or an issue.

License

Flyoff is licensed under the MIT license. See LICENSE for more information.

You might also like...
A browser app that evolves vehicles using genetic algorithms, written in Rust and Bevy
A browser app that evolves vehicles using genetic algorithms, written in Rust and Bevy

Vehicle Evolver Deluxe This is a simulation that uses AI (to be specific: genetic algorithms) to try to build better and better vehicles. The vehicles

Genetic Algorithms Library

genx genx provides modular building blocks to run simulations of optimization and search problems using Genetic Algorithms (GA). The vision for genx i

Texas hold'em poker odds simulator

odd ♠️ a rusty Texas Hold'em poker odds simulator Installation brew install rustup git clone [email protected]:ocisly/odd.git cd odd rustup -V cargo inst

hubpack is an algorithm for converting Rust values to bytes and back.

hubpack is an algorithm for converting Rust values to bytes and back. It was originally designed for encoding messages sent between embedded programs. It is designed for use with serde.

Library that implements different versions of PPMD algorithm (compress and decompress)

ppmd-rs Library that implements different versions of PPMD algorithm (compress and decompress) Dependencies Rust 1.58 or newer Cargo How to build Clon

Online algorithm for mean and variance, with support for uneven weights

welford Online algorithm for mean and variance, with support for uneven weights. This implements the Welford's online algorithm for computing mean and

A SIMD-accelerated Adler-32 rolling hash algorithm implementation.

simd-adler32 A SIMD-accelerated Adler-32 rolling hash algorithm implementation. Features No dependencies Support no_std (with default-features = false

A Trig-less Line of Sight Algorithm in Two Dimensions

In many examples of 2D line-of-sight algorithms, expensive operations like trigonometry are used. Additionally, some methods have intentional inaccuracies in them for the sake of simplicity. Here, we give an algorithm which does not fudge the numbers, and uses only basic arithmetic: addition, subtraction, multiplication, and division. This is not intended to replace the existing algorithms, or even be more efficient in practice.

Rust implementation of AstroBWT Proof-Of-Work algorithm

AstroBWT AstroBWT is a proof-of-work (PoW) algorithm based on Burrows-Wheeler transform (BWT). Developed and used by the DERO Project for Mobile (arm)

Owner
Priyam Srivastava
Helloo
Priyam Srivastava
Maximum Relevance - Minimum redundancy feature selection algorithm

mrmr Maximum Relevance - Minimum redundancy feature selection algorithm implemented in Rust. Usage CLI app. It gets input from a csv dataset with head

Jorge 2 Jan 1, 2022
Rust implementation of real-coded GA for solving optimization problems and training of neural networks

revonet Rust implementation of real-coded genetic algorithm for solving optimization problems and training of neural networks. The latter is also know

Yury Tsoy 19 Aug 11, 2022
Execute genetic algorithm (GA) simulations in a customizable and extensible way.

genevo genevo provides building blocks to run simulations of optimization and search problems using genetic algorithms (GA). The vision for genevo is

Innoave 110 Dec 21, 2022
Example of a genetic algorithm in Rust and Python

Example of a genetic algorithm in Rust and Python Monkey typewriter Finding the phrase 'To be or not to be. That is the question.' Inspired by the exa

sotrh 2 Jan 27, 2022
Genetic Algorithm library in Rust

RsGenetic Summary and Features RsGenetic is a framework for executing genetic algorithms in Rust. It is designed to have a simple but modular API. Exa

Mathieu De Coster 74 Dec 27, 2022
nsga is an opinionated implementation of the NSGA-II (Non-dominated Sorting Genetic Algorithm)

nsga nsga is an opinionated implementation of the NSGA-II (Non-dominated Sorting Genetic Algorithm), a multi-objective genetic optimization algorithm.

Max Kuznetsov 8 Oct 1, 2022
AI learns to play flappy bird using neuro-evolution, implemented in Rust using macroquad

Flappy Bird AI AI learns to play flappy bird. This is a neuro-evolution simulation of flappy birds implemented in rust using macroquad Demo Usage Clon

Bones-ai 18 Apr 23, 2023
Linear Programming for Rust, with an user-friendly API. This crate allows modeling LP problems, and let's you solve them with various solvers.

good_lp A Linear Programming modeler that is easy to use, performant with large problems, and well-typed. use good_lp::{variables, variable, coin_cbc,

Rust Operations Research 101 Dec 27, 2022
Suite for automatically testing algorithm questions from the Polish Algorithm Olympiad.

oisuite Your number #1 tool to managing your algo questions! This software only works on UNIX-based operating systems (macOS, Linux, BSD, etc.) Projec

null 3 Nov 25, 2021
Fast, parallel, extensible and adaptable genetic algorithms framework written in Rust

oxigen Oxigen is a parallel genetic algorithm framework implemented in Rust. The name comes from the merge of OXIdación (Rust translated to Spanish) a

Martín Pozo 146 Dec 18, 2022