Coder Social home page Coder Social logo

forza-autopilot's Introduction

Forza autopilot

AI autopilot for Forza Horizon 4

What it does?

This autopilot drives as you learn it to drive, I've implemented car detection so that it can avoid them, but it's not working 100%. And for some reason this model is working way better without minimap than with it :DD.

Requirements

  • Python 3.8
  • Tensorflow
  • Keras
  • NumPy
  • OpenCV-python
  • d3dshot
  • keyboard

direct inputs
source to this solution and code: http://stackoverflow.com/questions/14489013/simulate-python-keypresses-for-controlling-a-game\ http://www.gamespp.com/directx/directInputKeyboardScanCodes.html

Installation

git clone https://github.com/CallMeRZIBI/Forza-autopilot.git
cd Forza_autopilot
mkdir collected_data
mkdir training_data

Usage

For collecting data:

py data_collection.py # then enter the number of actual session when you will be promted

# To end collecting data click on the image viewer and press 'q'.

For loading data to dataset:

py load_data.py # this can take a while

For training model:

py train_model.py

And lastly for running trained model:

py run_model.py

# If you want to pause the model just press 'o' and for playing press 'i'.
# For total stop press 'q'.

Quick Demo

https://www.youtube.com/watch?v=QuSVBz2y48c

forza-autopilot's People

Contributors

callmerzibi avatar

Stargazers

 avatar XIN, Ren avatar  avatar CzHendry avatar

Watchers

 avatar

forza-autopilot's Issues

In which window or image have i to press 'q' ?

I would like to stop the data_collection script, but I don't know in which window or image I have to press 'q'.
And my data_collections script is also saving no data but the session folder is always created.

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.