Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

PolyTrack

A high speed low-poly racing game. · By Kodub

Whats the view of TAS agents?

A topic by zanarian created 11 days ago Views: 167 Replies: 16
Viewing posts 1 to 2

just curious as i wanted to see if i could make one. if i do, im never going to pretend the agent is me or a real human player

Think I saw a video somewhere about a Polytrack TAS agent.

here: https://www.youtube.com/@PolyTAS

(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!