Globally, it will have the following components:
==========================================================================================================
Information scraper
While running, the program needs information to base its decisions on. This information will be supplied in the form of a screenshot of the window and some scraped values that can not be (easily) determined from said screenshot. These include whether the wheels are currently on ice, among other things.
This information is gathered from RVGL's memory by an injected .dll, which is then piped back to the main program. (You can get this information externally too, but the .dll is required later and I feel it is cleaner to have all the interaction with RVGL in one place.)
RVGL setup
Bots don't like menu's, so I'd like to avoid them where I can. This will be done by writing the necessary information (car to pick, level to load, amount of laps, etc) to RVGL's memory and calling the function that loads the level from the .dll. This way it never has to interact with the UI.
Custom shaders
While texture's and lighting make a track more interesting for humans, it (usually) does not contain any relavent information for driving the track. All this extra information might actually confuse the bot. Now that Re-Volt supports custom shaders this problem is easily solved: all this extra information can be omitted. Since we have 3 color channels to work with, the information will be saved as follows:
- Walls: the geometry of the track.
- Objects: the pickups, instances, cars, etc that fill the track.
- Effects: the particle effects created by some objects and items.
Unfortunately, there are some problems with this approach. For instance, some things like oil slicks and the zap effect on cars will not display. Transparancy and mirrors might also cause confusion. I don't have a solution for this yet, but its impact is somewhat limited.
Intelligence
The information returned by the scraper needs to be processed by a learning algorithm to determine the best course of action. Currently I'm planning to use Deep Reinforcement learning like Google's Deepmind. I'm not going to implement this myself: there are plenty of good existing libraries that I can combine to create what I need. Doing it all by myself would admittedly be either too complicated for me, or take me tons of time.
I'm still uncertain as to some of the details to Deep Reinforcement learning, so I might decide to go with another algorithm if I find it to be unsuitable once I fully understand it.
Setup
Finally, I of course need to inject the .dll before I can use it. This is done by a setup program, which passes the pipe handle to the intelligence after it is done.
==========================================================================================================
As for my progress so far, currently the .dll is injected succesfully and communication is established:
![Image](https://image.ibb.co/jubgzy/a.png)
It just sends a short message to test the connection.
As you may have seen, the shaders are also finished. Here's a lap with them:
https://youtu.be/gakWK99fiRc
I've also been able to read and change some values like total car count. I have yet to find all the addresses though.
That's all so far, so I'm far from finished. I'll post updates to my progress here every so often. I hope you like the project! ^^