Panel Meeting 10/4/21-10/6/21
I had to change up my project, again. Instead of a lab report being my project, the computer program itself will be the project. My paper topic also has to change, as the project has drifted too far away from social psychology, so my new project no longer makes sense in relation to the paper. I’m unhappy with this as I’ve seen YouTube videos where people were used as test subjects, with some being minors, but I understand that if someone were to sue, the school would be liable. Because of this, my new paper topic will focus around simulation and Machine Learning in research, as well as something involving the uses of AI in everyday life, although that feels too broad. I do not look forward to writing a long essay, as it will be my first essay longer than three pages.
First Grind 11/17/21
Today was the first day of work towards my project. I watched a 1.5 hour Unity tutorial and followed along. I made my first moveable character, although the camera movement from the tutorial has since broken in newer versions of Unity. After completing the tutorial, I spent about another 2.5 hours just messing around with the NavMesh AI system, but I could not get it to work properly. This really frustrates me, as I chose Unity because of its built in AI functionality. I thought that it would be a more well-designed feature, but I guess not.
First Mentor Meeting 12/6/21
It has been a rough journey getting here. It started back in the 17th of September. I found a professor at Norwich University who seemed like the perfect person to be my mentor. Professor Fleming was unable to be my mentor, but he was kind enough to set me up with Dr. Corbin. We had our first and last meeting on September 27th. She informed me that my original project idea would be impossible to pull off, and that was the point where I switched to the simulation project. Since she could no longer help me, I was referred to Dr. Battig, who then referred me to the HS outreach group, who referred me to someone named Jordan, who never actually sent an email to introduce themselves. By this point, I was four days past the due date for finding a mentor, and I was back to square one.
On November 10th, I sent an email to Mr. Weaver, a teacher at RUHS. He agreed to be my mentor on the same day, but because of some organizational difficulties, I didn't see the email until the 22nd, at which point we were on vacation. Finally, on the third of December, we scheduled the meeting, and here we are now.
The first meeting went very well. We met virtually, and I think he’ll be a great mentor. Unfortunately, he doesn’t know Unity, so he’ll have to learn alongside me. More than anything, it's a relief to finally have a mentor.
Beginning Frustration 12/7/21
By this point, I have put about seven and a half hours into my project. I've followed tutorials from Brackeys; a YouTube channel, as well as a few official Unity tutorials. The two hours spent working have mostly just been trying to solve a variety of errors. Most are just run of the mill crashes and syntax errors, but sometimes I get crazy bugs, like the player glitching into a food pellet and spawning infinite amounts. I really wish I got a screenshot of that before my computer crashed. Despite my pre existing knowledge, Unity is going to be excessively difficult for me, given the time constraints and the fact that I have to PROGRAM MY OWN AI.
Frustration 12/27/21
I just completed another two hours of work, and I am getting more frustrated. I genuinely don’t understand why certain elements of code don’t work, and the documentation for some things is sparse at best, non existent at worst. I’m tempted to move to Unreal Engine, but I’ve already put a decent number of hours into Unity. Even though I have a decent mid tier graphics card, Unity just lags so hard that it seems unusable at times. I’m running Windows 11 now, so that may be part of the problem. (2/27/22 Little did I know, my GPU was dying... Ah, simpler times.)
Pivot 1/2/22
I’m up to my end with Unity right now. I’ve spent the last few hours just trying to get a display of how much food I’ve collected on the screen. According to the official documentation, I’m supposed to create a GameObject that links to my Player object in the game, then make a new Food object and give it all of the properties of my game object, and blah blah blah. It is so incredibly complicated! I just want to keep track of a variable and I’m losing my mind. Unreal would just have me drag a node in place and it would work. If I can’t get this working soon, I will switch to Unreal. There is an AI plugin with a very usable interface that looks super appealing right now, even though it has an 8 hour tutorial attached to it. My next meeting with Mr. Weaver is on the 19th, so I’ll bring it up with him then.
Failure 1/8/22-1/9/22
So Unreal Engine was a not going to work. It uses “Decision Trees,” which are just weighted random number generators. I am going to have to learn how to make an extremely complicated AI from scratch. This is going to be a nightmare. On the plus side, I did find a better Unity tutorial, so I’ll hopefully have a better time just navigating Unity. Also, I discovered that the lag was being caused by rendering the lighting in the scene every time I moved something, so doing anything was super laggy. Now, everything runs fine! There’s an unseen benefit to everything, I guess. :/
Hope 1/27/22
I just had a meeting with Mr. Weaver, and I have a new game plan. There is a plugin for Unity called ML-Agents, which I had looked at previously, but glanced over because the installation instructions on the GitHub (a place where people can share code) were broken. It turns out that I was trying to install the plugin incorrectly. Mr. Weaver shared a tutorial called Hummingbird, in which you program a hummingbird to fly around and collect nectar. The level and models are pre-built, but I have to do all of the coding and training. After I go through this tutorial, I’ll resume work on my main program and take what I have learned from this and use it.
Success! 2/18/22
I finished the programming! I have a controllable hummingbird and the flowers change color when I place the beak of the hummingbird in the middles for 2 seconds. There is one problem; I can’t get the hummingbird to train. Unity itself does not come with a way to train a neural network, so a Python (programming language) environment (place where Python code can be run independent of the computer) must be made. I successfully made the environment, but I keep getting error after error after error. I am very frustrated, and I have no clue where to go from here. I am going to try running it on an older version of Windows soon, so that might help.
Setback 3/5/22
So… my Graphics Card died. That means that all of my work is trapped on a computer that I can’t even turn on. My family does have a media center PC that I put together about a year ago, and it has integrated graphics; not good enough to run Unity, but good enough to get my stuff from my dead PC. One of the marvelous things about building your own computer is that you know where everything is, and with a few screws, I can just remove my SSD straight from the motherboard and stick it in an external reader. I bought one on Amazon for about $20, and I’ll be able to boot the media center PC from it. In the meantime, my parents and I are scouring eBay for used Graphics Cards under $500, although that may not be the best idea, because used graphics cards could just… die. I don’t need to have that happen a second time. The other possibility is to buy an M1 Mac Mini from Apple, but then I would have to start over.
(UPDATE 3/16/22: We decided that a used GPU was too risky, so instead we took a greater risk and ordered an M1 MacBook Pro from Facebook Marketplace, and that was a scam. They hijacked a shipment that was being sent to Randolph to make it look like our product was being shipped. Thankfully, Facebook was quick to give us our money back. Yesterday, we took a trip to the Mall of New Hampshire to pick up a brand new Mac Mini, and I am typing this journal on said computer. I will have to start all over on the Hummingbird tutorial, but I’ve done it once before so it can’t be that hard. Right?
Revitalization 3/23/22
It’s one of my parents’ 52nd birthday! I get to 3D print her a moose today! Besides that, I have made great strides towards completing this thing. The build of Unity that I’m using is a beta because Apple Silicon is still relatively new. Because of this, I’ve had to make some adjustments to the code (Stack Overflow has saved me once again) and I have an AI training itself! It is super laggy because the GPU in this computer is quite slow, but it’s working!! Also, my project has taken a turn, hopefully for the last time. I have learned a lot about artificial intelligence, but more than that, I learned my own limitations. I set out on an enormous journey with zero prior experience. It’s comparable to setting out on a journey to climb the face of a cliff with no training, but without the danger of falling off a cliff. I originally thought to myself “well, I already know how to program, and I can pick up Unity pretty quick, so machine learning should be just as easy!.” That was stupid. It took me almost 5 years of attending a weekly class to get to where I am. I would’ve needed to put in hundreds or even thousands of hours to reach a level where I could just sit down and write my own Artificial Intelligence. In other words, the hummingbird tutorial (with a few modifications) will be my project. Mrs. Holder has okayed me on this, so I’m going to finish training, then build in my own (reasonable) addons. I plan to add controller and VR support, so that anybody can compete with the AI to collect the most flowers.
Final Stretch... 4/3/22
I had some problems training, again. Well, I did successfully train it, but then I couldn’t use the file. I tried all kinds of things, from reinstalling Python to completely restarting the training part of the tutorial. It turns out that I had been using python through Apple’s Rosetta 2 conversion layer (a specialized piece of software developed by Apple to allow applications designed for older Macs to run on the new Apple Silicon Macs), which was adding to the lag. I have since fixed that, and I now have successfully trained a complete model! I am so incredibly relieved that this step is done, but there's still a ways to go. The next step is to begin building my portfolio, and then build in as many features as I can with the time I have left. I’m so close!!!
The End 4/24/22
Today was my last day to code before I begin assembling my portfolio and writing my final journal entry. I'm really running out the clock, but I hope it will be worth it. Today, I rewrote the Heuristic function (the function responsible for player controls) to support a game controller. I found some official documentation from two years ago, and it seems to work pretty well. I still have some tweaking and feature changing before May 25th, but that's for after the 29th of April. I am feeling a lot of emotions writing this: fear, joy, regret, among many. I am fearful that I will procrastinate until the very end, I'm filled with joy at the thought of being almost ready to turn this thing in, and I feel regret that I did not do more. It's been a fun ride, but now it's time to hop off.