GithubHelp home page GithubHelp logo

vobject / deep-nfshp Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 1.0 74.94 MB

Deep neural network trained to drive Need For Speed III: Hot Pursuit

License: MIT License

Python 100.00%
machine-learning deep-learning keras tensorflow convolutional-neural-networks need-for-speed autonomous-driving racing-games

deep-nfshp's Introduction

Train a convolutional neural network to play Need For Speed III

Deep neural network trained to drive Need For Speed III: Hot Pursuit (1998).

The model's input is an image of the current situation on screen and outputs a steering angle.

See it in action here: https://youtu.be/V_uwjSzxC84

Overview

TODO: files, parameters, preconditions

File Description
collect.py Capture training data from a running NFS process while driving
train.py Train the model
drive.py Load a trained model and predict steering for a running NFS process
model-XYZ.h5 Trained model weights

Training

TODO: screen captures, input captures, image proprocessing, data generation, model training, epochs, Tensorboard

Testing

TODO: load model, predict steering angle, send input

Future

A few ideas for improvements. Suggestions or pull requests welcome.

Drive faster

The model has no sense of speed. The speed is artificially capped around 80-90 km/h by using manual transmission and always drive in gear 1. I have a few ideas on how to approach this but nothing backed by research or experience.

Drive all tracks in the game

NFS III: HP comes with 9 race tracks. The current model is only trained on the Summit track and performs well. It also does a decent job driving the never seen Country Woods but it is useless on all other tracks. A future goal is be to train and generalize enough to drive all the tracks in the game.

Stretch goals

  • Avoid traffic. The game fills the tracks with traffic if opponents are turned off.
  • Manual transmission.
  • Script and control the game process from within Python. Would make development and evaluation easier.
  • Perform with different camera settings. The CNN was trainged solely on the bumper cam. Other settings work much poorer.
  • Perform with different resolutions. The CNN was trainged running the game in 1024x768 windows mode. Other settings work poorer.

References

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.