CounterBot - Advanced Toribash ABD AI
CounterBot is an AI developed by Eutaxyy and I that knows how to play aikidobigdojo, and is pretty good at it. It utilizes a large data set of replays to mimic previous inputs in response to the position it is in. At the time of writing, it is only working with about 50,000 ABD replays, including replays from over 2,000 individual accounts. We gathered these replays by using our ReplayMaster bot, which I've made a more detailed thread about here:
https://forum.toribash.com/showthread.php?p=11819884. This CounterBot was also created on top of the same decap framework as the ReplayMaster for testing purposes.
Examples of the AI in action
These individual replays were cherry picked, the AI does not always perform this well, but does behave similarly often enough. The colorful tori is me, the default one is the AI.
How does it work?
We don't want to go into too much implementation detail, but the general outline is that the AI will compare it's current position, rotation, angular velocity and linear velocity of each joint to every move in every replay of the data set. We give it a list of factors that dictate what is most important; for instance, we might tell it to care more about position than rotation, or to care more about the left ankle position of the enemy. After it compares using these factors, it finds the best fitting "counter" to the situation it is currently in. This is why it thrives off of as much data as possible; it needs more replays that include new situations so it knows how to counter obscure situations better. It does not learn from anything, and is not a learning algorithm in any other way. The only way it can get better is to be exposed to more data, which means getting as many replays as possible.
Where does it fall short?
As mentioned previously, it is not good at handling situations that one might consider obscure. If it's unfamiliar to the data set, the bot will choose a counter that is further away from what is actually going on, simply because it doesn't have any closer data to work with. For that reason, it's ability deteriorates the further away from the center of the dojo it gets, as well as in situations that just don't happen very often. Furthermore, it does not have any real understanding of the physics, it doesn't necessarily know what's colliding, what is grabbing, or if it's about to slam it's knee into the ground. It can only hope that someone has been in a similar situation before in the data set, and did something to fix that upcoming obstacle. Finally, it happens often enough that it chooses a move that may have worked against one person, but won't work against another. It's very situational and often times does something that makes you go, "What in the Hell?".
How is the data set used?
We have a few variations of our total data set that we use, because in some ways a different data set yields more favorable results. The first data set is code named "all", which is what you might think. It's every replay we've gathered fed to the bot, including replays from completely random, new players, and the thousands of replays we have from incredibly skilled players. The next data set we have is code named "refined", where we filter the "all" set to only include replays that include at least one "good" player. A "good" player is any player in a list of names that is being maintained by hand, and is entirely opinion based. Then, we have the "strict" data set, which is a lot like the "refined" one, except it's replays containing ONLY "good" players, not just one. And finally, we have "refined-winner", which is the "refined" data set but only containing replays where the "good" player actually won the match.
What are the intentions?
This was originally intended to just be a hobby project, a sort of "would that work?" proof of concept. As it went on, and we proved it would work, we had a handful of different ideas as to what we could do with it. The most notable idea is that, we would like to host this in a private room with a password that we would share, as a form of 24/7 "trainer". Something that people could fight for fun at any time. This currently won't happen without admin approval, as well as the fact that it does require some decent hardware to run (multi-core processing and around 4GB of RAM at the time of writing) at a speed acceptable for real time game play.
Last edited by Kris; May 21, 2021 at 02:16 AM.