Code Monkey home page Code Monkey logo

speedyblackman's Introduction

An AI that plays NFS Rivals

Note: "speedyblackman" is YT/Blackpanthaa's IGN. Nothing racist.

Here's the plan (Oct 13 2021):

  • Three different models on three different datasets.

    1. Acceleration, break, reverse frames
    2. Left, right turn frames
  • Work on left/right dataset first, then acceleration/break dataset.

  • Implement speedyblackman.

Vague TODO:

  • Create dataloader for the dataset working with and save the copy to drive.
  • Test the dataset on different models.

Training completed (Nov 30 2021).

  • Trained the turns data on ResNet18, VGG-19_bn, InceptionV3, MobileNetV2 and AlexNet.
    • AlexNet gave the best results when implemented.
    • Although the train, test accuracies were high, all the models seemed to overfit over a few epochs except AlexNet.
  • Trained the acceleration data on ResNet18, MobileNetV2 and AlexNet.
    • MobileNetV2 gave the best results when implemented.
    • Almost all the models overfit. So the model that least overfit was chosen for the implementation.
  • The data was not sufficient
    • 10GB (~52k frames) of turns data was used (which gave pretty good results).
    • 1.35GB (~6.8k frames) of acceleration data was used (which was definitely not sufficient and hence every model overfit).

Wanna play around with it?

  1. Get NFS Rivals - you know what to do

  2. Clone this repository and change directory into it

    git clone https://github.com/insaiyancvk/speedyblackman
    cd speedyblackman
    
  3. Download the weights from drive and save them in speedyblackman folder

  4. Install the dependencies

    pip install torch torchvision numpy keyboard opencv-python

  5. Start the game and run the code

    python speedyblackman.py

Enough of my rant, look the result for yourself

Check it on youtube and few other clips in drive

speedyblackman's People

Contributors

insaiyancvk avatar

Stargazers

Somnath Sharma avatar Abhijit Ramesh avatar

Watchers

 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.