Iāve always wanted to make something like this, but could never get around figuring out how to do the teammates/enemy team AI. Just curious how you did that one, is it reinforcement learning, if so, with what heuristics, how is the reward and all that.
I would love to hear a technical breakdown, or just a simple one would be nice. Just a nerdy CS student, but not much of a game dev haha
Love the game, definitely getting it when it releases
Thanks for checking it out! With regards to the player AI, itās all controlled with a finite state machine. So their states are broken down into like āfreeā, ātacklingā, ābeing tackledā, āin ruckā etc. then within those states you can do further checks to control their placements depending on who has the ball or if the ball is free etc. the hardest state is the free state, because this is basically where the most decisions are made. I save each players formation in separate arrays depending on defending, attacking, line outs, kickoff, scrums etc. and they will align by checking the array and moving towards those positions. I swap between a mix of hard coded coordinates on the pitch, which is exact x and y values. And sometimes offsets from the balls position. Depending on the situation. Hope this helps, and good luck with any future efforts!
1
u/EatThatPotato š°š·Koreaš°š· Mar 04 '25
Iāve always wanted to make something like this, but could never get around figuring out how to do the teammates/enemy team AI. Just curious how you did that one, is it reinforcement learning, if so, with what heuristics, how is the reward and all that.
I would love to hear a technical breakdown, or just a simple one would be nice. Just a nerdy CS student, but not much of a game dev haha
Love the game, definitely getting it when it releases