Skip to main content

Matthew - Blog Post 8

replaymanager.py is only 339 lines long but it feels at least three times that when I'm working on it. The module is definitely due for a refactor. For one, the term subdataset should be renamed to version_set and extracted into a class. version_set more accurately and describes what it is, and the class extraction would clean up the namespace in ReplayManager. There is probably some kind of class extraction possible for replays, so that their names, paths, file streams, and Twitter profiles can all be neatly encapsulated, thereby cleaning up the namespace even more. However, I do not want to worry about having two kinds of replays: the one used by ReplayManager and the one used by ReplayParser. Even though ReplayManager does not use ReplayParser, the prospect of making things more muddier deters me.

There's probably a right way to refactor this code, but, to put it simply, now is not the time. Speaking of time, I came up with a great way to get work done, even when I am sleeping!

One cannot sleep and work
I need sleep
Computer does not need sleep
∴ Computer does all the work while I sleep?

It's been a while since I had to deal with logical arguments, so that may not be entirely sound. Or valid? Anyway, I set the collector agent loose on Rivals of Aether version 1.0.2. Over the course of about a day and a half, where most of that time was during the night, the agent amassed 41.6 GB of frame buffer data. That's at 1/4 scale, too! At full scale that works out to be around 166.4 GB!! That's like two copies of Nioh!!!

That 41.6 GB of 1/4 scale frame buffer data represents 331 replays. We need to know if all of that data is actually usable; otherwise, we'll waste a lot of time training a model on improperly indexed or incomplete data. To address this, I wrote methods in ReplayManager designed to produce a variety of sets. The first variety is the random sample set; it uses NumPy's random choice function to randomly select a given number of replays. These replays are copied into a separate location for later review. The second variety is the one we'll need later; it takes the entire dataset and uses the same random choice function to randomly distribute the dataset into a training and a testing subset, according to a preconfigured distribution. The current distribution is 80% training and 20% testing. This function works, but I haven't run it with the actual copying enabled because it will, literally and by definition, double the storage requirements of the dataset. These methods copy rather than move because the data has reached a stage of processing at which it is expensive to reproduce. I will need to establish more backups before I risk moving data destructively.


Our next step is to review the random samples. Once those are validated (manually, using the demo code), we can finish collecting for version 1.0.2. Then we'll sort the dataset into training and testing sets, finish the replay loader, and start running our LSTM. Then sleep while the LSTM does its thing.


Comments

Popular posts from this blog

Matthew - Capstone Blog Post 1

First I would like to discuss our goals and long-term plans. We want to create an artificial intelligence that learns how to play first-person shooters without access to any game state data other than what can be gained through the audio and visual buffers. In other words, the AI will only have access to the information that a human player would. If we are successful with these constraints, then I could see our work leading to AI that can play any game, or even AI-driven robots that can play games using mechanical hands and eyes to operate normal peripherals and interfaces.

We are currently in the research and planning phase of the project. This means that our job right now is to decide exactly what tools and technologies we will use and how they will interact with one another. By the end of the semester, which will arrive sometime this December, we will need to be ready for phase two, which is the development, training, and testing phase. Yes, that is all three at once. However, if …

Rei - Capstone Blog Post 1

Over the past couple of weeks, Matthew and I have been trying to narrow down our idea for capstone. We have settled on a "Modular" AI that can play First Person Shooters or other similar video games. However, we decided to put a slight twist on the idea of an AI playing games. Most of the AIs that are currently out have more information than they should possibly have at that time, like the location of players. We decided that our AI would only have information that would be accessible to a human player. We also noticed that many of the "PlayerAIs" out there are reactionary, not planning. While reacting is a key part to many of these games, so is strategy. We want to create an AI that thinks, at least a little bit, about that actions it is making or should make.

Since narrowing down our topic we have split off and started looking at different existing technologies and research that could help us understand and create this project. I decided to look at some computer…

Matthew - Capstone Blog Post 4

Finally, our CSI-480 (Advanced Topics: AI) course material is catching up to where we need to be. We are covering perceptrons and sigmoid neurons in the lectures, and we are also using TensorFlow to solve some very simple introductory problems (via tutorials). To supplement this I have been reading Neural Networks and Deep Learning by Michael Nielsen, a textbook available for free on the internet, which dives into neural networks right from the first chapter. Additionally, I have been finding 3Blue1Brown's multi-part video series about deep learning to be extremely helpful for visualizing some of the more advanced concepts. Even if I do not fully understand the calculus and linear algebra involved, at the very least I have a better idea of what goes on inside of neural networks. For example: I know what loss and gradient descentalgorithmsdo, essentially, and I also understand how the latter helps find a local minimum for the former, but I do not necessarily feel confident in my …