View Single Post
Thread: AI in toribash
I'm a software engineer, and creating an AI for TB really depends on what information can you extract from the API, if there is even one.
You have to take into account the 4 joint states of all the joints to map what might happen in the next x frames the mod is set to use in a turn, plus you have to factor in collision effects, but otherwise there is a limited number of states (4^40 = 1208925819614629174706176, basically a metric fuckton) you'd have to investigate if you want your bot to have the best winrate possible.
If it was possible to have this done in a reasonable amount of time, what you'd need to do is see which state gets you closer to victory in the majority of scenarios (so 4^20 per state you can choose, 4^40), be that more points or your opponent getting closer to disqualification and just roll with that. Optimal (short term) play by the bot would follow. You can improve this by calculating each possibility for the next turn, and the next turn, and so on, and choose your move based on that extended map instead.
Really resource-intensive, but this bot could play TB even if the guy making it couldn't.
You can simplify this model by introducing openers / pre-set moves, limiting the scenarios you investigate per turn, etc.

Edit: fractures and DMs obviously reduce the amount of calculations needed.
Last edited by ynvaser; Jul 8, 2018 at 02:52 PM.