• Stars
    star
    3,883
  • Rank 11,286 (Top 0.3 %)
  • Language
    Python
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Explorations of Using Python to play Grand Theft Auto 5.

Python Plays Grand Theft Auto 5 - Reboot

This is a reboot of the project from 2017, but with a whole new approach. This time, instead of collecting data by hand and training a classification model, we opted to create a whole new system for the data collecting, training and playing, and to do all of that live. Our models are now using regression (with other output types being still possible), training data is collected automatically and we stream models during their training phase so anyone can join and watch the progress.

Our AI, besides having multiple alter-egos (models), is still called Charles, like in 2017.

For a full explanation, refer to the System page, but for a quick summary - we’re using a central server that all other parts connect to. The Data Collectors run in separate GTA5 instances and our NPCs are collecting and Balancing the data, which is sent through the Server to the Trainer. The Trainer buffers these data, trains the model and updates the Player. The Player is using the Dual-Camera system to play so we can watch the 3rd person camera (also called cinematic camera) while the model is fed the Hood Camera.

For more information, refer to these other pages:



Stream and current stream layout:

The progress is being streamed on Twitch: https://www.twitch.tv/sentdex. Below we keep a list of dates and streamed models.

Stream's layout consists of: layout.jpg

  • top-left tile is the 3rd person camera of the car driving, the main camera to observe Charles
  • this main tile, in its lower-right corner, shows the current model and when it's been created
  • top-right tile called Hood Camera is exactly what the models "see" - the input to the convolutional backbone of the model
  • middle-right tile called Convcam shows the reshaped output of the CNN backbone and lets us observe how the CNN part trains
  • bottom-right tile called Player Console shows current driving predictions along with additional information
  • bottom-middle tile called Server/Trainer Console shows training progress along with some basic training information
  • bottom-left tile called Tensorboard shows the loss of the training process


Driving examples:

Β 



Model list:



Streaming timeline

May 1st:

May 2nd:

May 7th:

May 8th:

May 14th:

May 16th:

  • Stopped streaming model_0006_inceptionresnetv2_v1 at batch 60500
  • The stream has been offline for several days since we had to send back the Comino machine and setting up another one took longer than we expected

May 28th:

  • After new machine was set and new models developed, we restarted streaming
  • Started streaming model_0009_irv2_cr_tl_v1 from scratch

May 29th:

July 5th:

  • Stopped streaming model_0004_inceptionresnetv2_v3 at batch 752000
  • The stream has been stopped as there have been no further improvements in the model and to catch up with documentation and do some off-stream development


Project timeline

This is not a full project log and contains only the key changes that are visible on the stream (and a few from before the stream has started). There are many more things going on "behind the scenes".

2017:

November 2021:

  • The idea of bringing back this project has born

Early 2022:

  • The project has started the development phase of the main system, the initial models, and the game mod

April 8th:

April 9th:

April 10th:

April 11th:

April 15th:

April 19th:

April 22nd:

April 24th:

April 30th:

May 1st:

  • The Convcam has been created
  • Started streaming on Twitch.tv
  • Started streaming model_0003_xception_v2 from scratch

May 2nd:

May 3rd:

May 7th:

May 8th:

May 13th:

May 14th:

May 14th:

May 16th:

  • Stopped streaming model_0006_inceptionresnetv2_v1 at batch 60500
  • Stream has been offline for several days since we had to send back the Comino machine and setting up another one took longer than we expected

May 22nd:

May 23th:

May 24th:

May 25th:

May 26th:

May 28th:

May 29th:

May 30th:

May 31th:

June 1th:

June 3rd:

June 4th:

June 9th:

June 10th:

June 13th:

July 5th:

  • Stopped streaming model_0004_inceptionresnetv2_v3 at batch 752000
  • The stream has been stopped as there have been no further improvements in the model and to catch up with documentation and do some off-stream development

More Repositories

1

NNfSiX

Neural Networks from Scratch in various programming languages
C++
1,407
star
2

GANTheftAuto

Python
842
star
3

socialsentiment

Sentiment Analysis application created with Python and Dash, hosted at socialsentiment.net
Python
464
star
4

TermGPT

Giving LLMs like GPT-4 the ability to plan and execute terminal commands
Jupyter Notebook
407
star
5

Carla-RL

Reinforcement Learning codebase for self-driving car in Carla
Python
363
star
6

ChatGPT-at-Home

ChatGPT @ Home: Large Language Model (LLM) chatbot application, written by ChatGPT
Python
316
star
7

BCI

Brain-Computer interface stuff
Python
295
star
8

ChatGPT-API-Basics

Jupyter Notebook
289
star
9

nnfs_book

Sample code from the Neural Networks from Scratch book.
Python
283
star
10

BLOOM_Examples

Some quick BLOOM LLM examples
Jupyter Notebook
259
star
11

nnfs

Neural Networks from Scratch
Python
179
star
12

Falcon-LLM

Helper scripts and examples for exploring the Falcon LLM models
Jupyter Notebook
170
star
13

Simple-kNN-Gzip

A simplistic linear and multiprocessed approach to sentiment analysis using Gzip Normalized Compression Distances with k nearest neighbors
Jupyter Notebook
142
star
14

SC2RL

Reinforcement Learning + Starcraft 2
Python
141
star
15

QuantumComputing

Collection of Tutorials and other Quantum Computer programming related things.
Jupyter Notebook
136
star
16

cyberpython2077

Using Python to Play Cyberpunk 2077
Python
121
star
17

GPT-Journey

Building a text and image-based journey game powered by, and with, GPT 3.5
Python
82
star
18

OpenAssistant_API_Pythia_12B

Creating and Using an Open Assistant API locally (Pythia 12B GPT model)
Jupyter Notebook
76
star
19

neural-net-internals-visualized

Visualizing some of the internals of a neural network during training and inference.
Jupyter Notebook
68
star
20

reddit_spam_detector_bot

Bot that detects spam/affiliate marketing authors, and posts some stats on their threads.
Python
59
star
21

Together-API-Basics

Some information for working with the Together inference API for Open Source AI models
Jupyter Notebook
57
star
22

LLM-Finetuning

Some helpers and examples for creating an LLM fine-tuning dataset
Jupyter Notebook
54
star
23

sentdebot

Code for Sentdebot in the Sentdex discord channel (discord.gg/sentdex)
Python
53
star
24

Lambda-Cloud

Helpers and such for working with Lambda Cloud
Python
51
star
25

NEAT-samples

samples of neat code
Python
51
star
26

uarm

uArm Things
Python
29
star
27

cellvolution

Evolutionary cell-based simulation
Python
24
star
28

satisfunctions

Fighting arthritis from Satisfactory one function at a time.
Python
22
star
29

PyGTA5_Reboot

Python Plays GTA V Reboot
18
star
30

TTSentdex9000

I am a human just like you!
15
star
31

chatbotrnd

working with chatbot response scoring.
Python
13
star
32

HF-Cache-Cleanup

cleanup cached models.
Python
11
star