All Projects → manassarpatwar → Watchcarslearn

manassarpatwar / Watchcarslearn

Licence: mit
Self driving cars using NEAT

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Watchcarslearn

Machine Learning Flappy Bird
Machine Learning for Flappy Bird using Neural Network and Genetic Algorithm
Stars: ✭ 1,683 (+2752.54%)
Mutual labels:  neural-networks, genetic-algorithm
Aimandshoot
A neuroevolution game experiment.
Stars: ✭ 201 (+240.68%)
Mutual labels:  genetic-algorithm, canvas
Dissecting Reinforcement Learning
Python code, PDFs and resources for the series of posts on Reinforcement Learning which I published on my personal blog
Stars: ✭ 512 (+767.8%)
Mutual labels:  neural-networks, genetic-algorithm
Micro Racing
🚗 🏎️ 🎮 online 3D multiplayer neural networks based racing game
Stars: ✭ 100 (+69.49%)
Mutual labels:  neural-networks, canvas
Applying eanns
A 2D Unity simulation in which cars learn to navigate themselves through different courses. The cars are steered by a feedforward neural network. The weights of the network are trained using a modified genetic algorithm.
Stars: ✭ 1,093 (+1752.54%)
Mutual labels:  neural-networks, genetic-algorithm
Geneticalgorithmpython
Source code of PyGAD, a Python 3 library for building the genetic algorithm and training machine learning algorithms (Keras & PyTorch).
Stars: ✭ 435 (+637.29%)
Mutual labels:  neural-networks, genetic-algorithm
Genann
simple neural network library in ANSI C
Stars: ✭ 1,088 (+1744.07%)
Mutual labels:  neural-networks, genetic-algorithm
Notebooks
Some notebooks
Stars: ✭ 53 (-10.17%)
Mutual labels:  genetic-algorithm
Meme Generator
MemeGen is a web application where the user gives an image as input and our tool generates a meme at one click for the user.
Stars: ✭ 57 (-3.39%)
Mutual labels:  neural-networks
Emoji Art Generator
Use a genetic algorithm to evolve an image by putting emojies on a canvas
Stars: ✭ 53 (-10.17%)
Mutual labels:  genetic-algorithm
Vue Luck Draw
🎖🎖🎖 一个基于 vue2 / vue3 的【大转盘 / 九宫格】抽奖插件;🎉 A lucky draw plug-in based on vue2 / vue3;🎨 奖品 / 文字 / 图片 / 颜色 / 按钮均可配置,支持同步 / 异步抽奖,🎯 概率前 / 后端可控,自动根据 dpr 调整清晰度适配移动端
Stars: ✭ 1,056 (+1689.83%)
Mutual labels:  canvas
Dpwa
Distributed Learning by Pair-Wise Averaging
Stars: ✭ 53 (-10.17%)
Mutual labels:  neural-networks
Convisualize nb
Visualisations for Convolutional Neural Networks in Pytorch
Stars: ✭ 57 (-3.39%)
Mutual labels:  neural-networks
Tensoranfis
A Tensorflow implementation of the Adaptive Neuro-Based Fuzzy Inference System (ANFIS)
Stars: ✭ 53 (-10.17%)
Mutual labels:  neural-networks
Calendar Graph
Calendar graph like github using jsx support SVG, Canvas and SSR
Stars: ✭ 58 (-1.69%)
Mutual labels:  canvas
Glslcanvas
Simple tool to load GLSL shaders on HTML Canvas using WebGL
Stars: ✭ 1,067 (+1708.47%)
Mutual labels:  canvas
Keras Gan
Keras implementations of Generative Adversarial Networks.
Stars: ✭ 8,494 (+14296.61%)
Mutual labels:  neural-networks
Grasp
Code for "Picking Winning Tickets Before Training by Preserving Gradient Flow" https://openreview.net/pdf?id=SkgsACVKPH
Stars: ✭ 58 (-1.69%)
Mutual labels:  neural-networks
React Handy Renderer
✏️ Draw 2D primitives in sketchy style with React
Stars: ✭ 56 (-5.08%)
Mutual labels:  canvas
Deep Viz
A React component library, providing concise and beautiful diversity charts with Canvas, SVG, E-map, WebGL, Dom, based on data visualization experience and commercial data display practice.
Stars: ✭ 55 (-6.78%)
Mutual labels:  canvas

WatchCarsLearn

watchcarslearn

Watch cars learn right in your browser! https://manassarpatwar.github.io/WatchCarsLearn/

The Car

car

  • Each car has 5 distance sensors which serve as inputs to its brain (neural network)
  • Each sensor has a max length and the input passed to the network is a normalized value of the sensor input (length/maxLength)
  • The brain of the car outputs 2 values, both between 0 and 1
  • The first value controls the throttle and brake of the car. If the value is greater than 0.66, the car accelerates else if it is less than 0.33, it brakes.
  • The second value controls the steering of the car. If the value is greater than 0.66, the car steers right, else if it is less than 0.33, it steers left.
  • The physics of the car is inspired by spacejack's implementation of Marco Monster's Car Physics for games paper

The Track

track

Procedural Track Generation

Beziers, Beziers, Beziers!

  • I used bezier.js for working with beziers
  • The track is made up of a lot of bezier curves
  • There exists a hidden path of bezier curves that runs through the middle of the track. I use this path to calculate score of each car, and check whether the car is on the track or it has crashed
  • The input sensor length is measured on every physics step. It is measured by calculating the intersection point between the sensor line and a nearest bezier curve

Editing and randomizing

  • The track is completely editable and randomizable on the fly
  • The simulation is paused while the user is editing otherwise the window will freeze up
  • To Edit, simply click on the pencil icon and drag any of the control points

Neural Network

network

Activation

  • The network is a feed forward neural network and stops any recurrent connections from being mutated
  • The network is activated using a list of nodes sorted topologically(Kahn's algorithm)

Nodes

  • Brightness of each node is the output of that node when activated

Connections

  • Connections which are green have a positive weight
  • Connections which are blue have a negative weight
  • Connections which are red are disabled

Neuro Evolution of Augmenting Topologies (NEAT)

Icons

All icons were created in p5.js web editor by me

Pencil

pencil_black
p5.js editor sketch for pencil

Randomize

random_black
p5.js editor sketch for randomize

Steering wheel

steering_black
p5.js editor sketch for steering wheel

License

MIT
Copyright (c) 2020-present Manas Sarpatwar

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].