Guess this is how I'm spending my weekend: End goal is getting an AI capable of grinding a free-to-play tower defence game so I don't have to.

Familiarised myself with the game's level format(s). Previous iteration had to scan the whole map at startup and relied heavily on machine vision to figure out what was where. Bit of a problem when this game can have over 2000 tiles in a map. Now I'm reading directly from the level data which is much much faster and gets me more information, but I'll need to model that information accurately in my program. I predict scripted events for later levels being a royal pain in the arse.

Still going to need OCR to read things like coins and the final score because like HELL am I reverse-engineering the game's replay format to figure out how well the bot did.

I also want to take the opportunity to make the AI a bit more robust. The last time I made an AI for this game, it was essentially blind and each model was level specific. The startup time each time I changed the map was prohibitively long, so the network just kind of moulded around the topology of the one level it was trained on. Want to make something a bit more generic that should even work in custom levels.

Still a bit unsure what the AI should be doing. Last one was fed a list of possible actions the generated by the program, it then assigned each action a weight and the program would pick a random option based on the weightings the AI spit out.

I'm thinking if I'm feeding it 2D map data, then it's basically an image processor, so maybe a convolutional neural network is applicable. Previously I was using NEAT because that's what I saw all the youtubers using when they made an AI play a video game, but I think that might be less applicable here. (I know jack shit about AI so I'm talking out of my arse)

xdotool/ydotool are some of the fiddliest automation tools out there, and it's not even their fault, it's just the state of input emulation on linux. The amount of shit that I had to do to get consistent mouse movements was maddening.

Took me like three days to get something capable of navigating the level select screen in this game, and frankly if the game didn't let you scale the UI consistently, I probably would've given up right out of the gate. But at least I can now point and scroll to an exact position on screen, regardless of resolution, monitor layout and even display server. You see my cursor hovering over level 1.3? That's what it's all about!

Follow

@VD15 the state of input emulation? Another casualty of the Wayland switch, or was it always bad?

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.