Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

interesting. in the short time since this post, ive made an agent that uses a neural network so its not confined to one track. currently training it. might make a youtube channel to show it off

Neato! how're you interfacing with the game? mouse control library, html requests, or something else?

well i tried to use Cheat Engine to get binaries from the app, but couldn't figure it out so im just using screen captures. super inefficient but it works. tried to use cv2 to capture the speed, but couldnt get it to work. so currently it doesnt know how fast its going, thinking about making an extension that reads the speed from the console or something similar

How're you going to tell it the reward function? --seems it'd need to know where the finish line is and the order of the checkpoints, and the landscape around them to know the best approach... Perhaps you could train it by watching the top replays of the map and trying to match the images it sees, though it'd need to have the same coloring as the top car to match it completely.

to be honest, i haven't figured that out yet im just doing it manually for now. its boring and slow, but it works

check up the replay for "TAS_Agent" on this map

PolyTrack14pdBB3teEEEAAA6r0sphdpEqJNMRlS4OcC5Pxnhr8ne0vzhTawZxbojIUYkCsPYLhsGSLiKZwBSyPDQRH2EkfhrbFNKxIOyPrADaelU1evK9fekebgSCM05afeA5f25TVhGTCV2My9OtxYC6nJz1PXsMWrnLrTxxOkfiobtZwt8cYETzVheYTtP8j5Yp2JcRJEYZawlvw0fNeCWWgeaDODLg7TEt7iOn1Xiysk1plTrTJux2xqG7Ors3eWjue1DUfirxpQzI2zO9UODeRzdIHOVOcfK4fEcsUWC

thats 100% the neural network driving, its the best result ive gotten so far

whaddya mean by 'manually'? Like you're manually giving the agent the reward or punishment based on watching it? If so, must have taken a real long time - nice work! Pretty good results, and even some drifting; that surprised me!

yeah i mostly just sit and watch it lol, ive tried and failed to automate it multiple times. i need to find a reliable way to get the speed. and currently it seems a browser extension to read the console is my best option

The hack-iest way I can think of is to take screenshots of every digit, 0-9, and then clip out the speedometer and check the pixel differences of each digit-place on the speedometer against the 0-9 screenshots, and append the one with the least difference to a string, and then convert it to an int. You'd also need a blank-space image for when there is no digit. But hopefully there's a better way!

yeah i was thinking of it, also tried cv2 to read it, but with the font it didnt work. and even after removing the font in the console, still didnt work... but i think ill try to make an extension to read the speed from the console

good luck! It's always fun to create something that ends up better than you at something -- Hope to race against the bot sometime soon :)

i have also attempted to get this working, the way I figured out getting speed is by manually taking a screenshot of each number and saving those images then finding the best match to the speed shown while running. note that its a bit tricky since it is not 100% opaque