“The idea is to extend standard robotic control methods by incorporating a genetic algorithm“.
When I read those words in a email describing Thetaball, my attention was officially grabbed. A digital sports game where the bots didn’t act like bots, and learned over time? Made by a single dev as a passion project over the past 5 years? and it looks like Tron?!
Thetaball is a wicked interesting game. It’s got a bit of a learning curve, and doesn’t have a ton of breadth, but it makes up for this in the depth of its AI. The game reacts to things in a way I haven’t seen other games do before and ultimately feels like a big step forward in game AI.
Thetaball is a 2D, physics-based digital sport. Each of the game’s 256 AI-controlled bots is a distinct individual, with behaviors honed by a process of simulated evolution. Because the bots have co-evolved within a rich physical environment — both cooperating with and competing against one another — their behaviors are diverse and lifelike.
There’s really not much to Thetaball on the surface: two teams of 6 take to the pitch and push a ball into a goal in a digital sport that feels like a mix of soccer, hockey and rugby. The game can be played as a single player league or as multiplayer, with up to 8 players taking control of bots on the field.
Where Tethaball shines is the depth of its gameplay. While the concept is simple, theres a lot going on under the hood and you can feel it. You see, what really sets Thetaball apart is the fact that the game has 256 AI-controlled bots each with what can only be called distinct individual “personality”. These bot’s behavior has been honed over many many gme through a process of simulated evolution and itteration. Thetaball’s bots have “co-evolved within a rich physical environment — both cooperating with and competing against one another”. the end result is that these bots don’t feel like bots. They have distinct play styles and lifelike behaviors on the field.
Sure, Thetaball take a little bit of patience to get into: the UI isn’t overtly friendly and while the tutorial does a fantastic job of teaching you how to control your player, there’s very little explanation of how to start actually playing, and you have to poke around with trial and error a little bit before you’ll feel like you really know what’s what. However, once you’re in a match, and the puck-ball is dropped…. it’s an exciting, tense and challenging experience to have bots that actually cooperate with you or with each other against you.
This experience is really only enhanced by the Tron-esq aesthetics. They’re simple; portrayed in lines and circles which glow fluorescent, and that works super well, letting you focus on the game and putting you in the futuristic cyber-sport frame of mind.
I desperately wanted to know more about this game’s background and development, so I reached out to Tim Sheehan, the solo developer of Thetaball, to ask him a few questions:
IndieHangover: Which came first: The game or the AI? Was this a project that was a game first, or was it a game that developed to utilizing the pre-existing AI?
Tim Sheehan: AI came first. Years ago I was playing around with a genetic algorithm for a Poker AI. But I came to the conclusion that for card games and board games, the best solution is always going to be some variation of tree search. So I decided to try evolving agents in a physics-based environment, where tree search doesn’t really apply. Thetaball came about as the testbed for that.
IndieHangover: Why would you not go with a tree search? Does that not facilitate a genetic algorithm?
Tim Sheehan: Well, it’s two different approaches. It was the idea of a genetic algorithm that really grabbed me though. I see games as analogous to nature. They’ve got agents with conflicting objectives operating in some kind of environment. So from that perspective, using evolution to create the agents seems like an obvious and cool thing to do.
IndieHangover: The question that first sprang to mind when I played Thetaball was how in the heck to you balance 256 AI-controlled bots, each with distinct styles? In a game with a competitive aspect, how did you approach making sure one team wasn’t just over the top amazing at this sport?
Tim Sheehan: Yeah, that’s the beauty of evolution — it’s self-balancing. In theory anyway. In practice, it takes a lot of fiddling with the parameters to get it working. And of course, evolution takes a lot of time. So every experiment with the parameters takes weeks to get a result.
IndieHangover: Were there ever any points during the evolution of these personalities where things went…shall we say…wonky? One bot went haywire or developed some odd way of dealing with a situation?
Tim Sheehan: Yeah — at the start they would crash into walls, or lock horns and get stuck. Gradually the figure it out. And they develop some cool strategies along the way. For awhile, the strategy of knocking out the goalie was widespread, but then it died out. I guess they still crash into walls sometimes. One interesting effect…Towards the end of a game, when a match is basically decided, there’s no selective pressure in that situation, so they start goofing around — not taking it seriously. Sometimes they goof around too early and blow it. That behavior is still in there.
IndieHangover: This has been a solo project for you for 5 years. What’s that been like? What worked? What didn’t?
Tim Sheehan: Well, it’s been great fun, watching the agents evolve. What worked? I’d say the genetic algorithm was a success — it really results in some rich gameplay. What didn’t work? Maybe going it alone was a mistake. I’m starting to realize that every Woz needs a Jobs.
IndieHangover: Normally we ask people what drew them to Indie Game Development, but here, it seems like the AI did and you’ve already stated why game’s were important. Was game development something you had always wanted to explore?
Tim Sheehan: Yeah, I’ve always been interested in games. I remember as a kid seeing Space Wars in an arcade and being so fascinated by it. I guess I’m dating myself — I’m older than most of the people doing this. But I developed this interest in computer programming, and it’s always been this thing I pursue just for my own amusement — I’ve never had a job in the tech industry. But some time ago I decided, maybe I should do a complete game playable by other humans. So Thetaball is the first thing I’ll be putting out into the world.
IndieHangover: What are some other Indie games/teams/projects that you are excited for or have really captured your attention?
Tim Sheehan: One upcoming indie game that really grabbed my attention is a thing called Noita from Nolla Games. It’s a 2D pixelated-type game, where every pixel is physically modeled. I think that’s the right direction to go in — physically simulated worlds instead of manually animated worlds. Then drop in some intelligent agents, and now you’ve really got something. And it looks fantastic.
Our thanks to Tim for sharing his insight and his story with us!
Thetaball is available today on the Windows and XBox Stoe.