Chess AI

As the final project in my Artificial Intelligence class, we created a game of chess in Unity where the computer made informed and strategic moves.

The AI is relatively simple. First It generates a list if possible moves, pushing them into a fitness sorted priority queue. Of those moves, it evaluates the ‘fitness’ of the resulting board. This is an incredibly simple calculation, as it just tallys each of the AI’s piece’s multiplied it by its associated value in inspector.

The players pieces then do some calculation, and the result is subtracted. This final value gives us our fitness for the move.

After each move is generated, it chooses the current best move (highest fitness), simulates it, and then attempts to predict what the players response will be. After generating a list of all of those moves, it assumes that the player will make the best move that it can, and so simulates said move. The new board (now two simulations in) is then fed back into the priority queue.

The algorithm then grabs the top of the priority queue, and the simulations begin again (resuming where they were if future moves have already been simulated for the current best performing move).

Now, it could keep doing this forever (or until it runs out of moves to simulate), but that wouldn’t be very fun for the player or the machine its running on.

Soooooo, there are two limiting factors: Depth, and Think Time

The depth refers to the number of simulated moves the game will generate spanning from a single starter move (included in the total). Given that it simulates its own moves and the players, a depth setting of 5 allows the AI to “plan” its next 3 moves.

Think time is what usually kills the AI’s turn, as it ensures that no matter what depth the AI is allowed to simulate to, it cant be thinking for more seconds than the Think Time Limit.

If you would like to see the code or download a playable build, head on over to my github: https://github.com/QuantumInfinite/ChessGame

Programmer portfolio

I have here my programmer portfolio I was required to make for one of my business classes at Niagara College. I will warn you that I am by no means a video editor, so it is a little rough. As well, we were required to show off at least one 3D modelled item we had made. Rather than use an item from my 3D modelling or art portfolio, I got cheeky and rendered a segment of code as 3D text.

Feed-forward neural networks for data classification

For one of my Artificial Intelligence projects, we had to study neural networks and how adjusting their initial properties effect their outcome.

To test this, we used two separate data sets, the age of Abalone’s (https://archive.ics.uci.edu/ml/datasets/abalone) and the the classification of Iris flowers (https://archive.ics.uci.edu/ml/datasets/iris)

Unfortunately, for this project we did not have time to use our own Neural Network. Instead we used WEKA, developed by the University of Waikato.

My findings and full paper can be found in the below linked pdf, and all of my datasheets can be downloaded at my github here: https://github.com/QuantumInfinite/Feed-forward-neural-networks-for-data-classification

Magehem

For my Niagara College Year 3 Capstone I worked with a team of 9 developers to create the VR tower defence game MAGEHEM.

All the details for the game can be found at https://digitaldetails.ca/ , but to summarize:

  • VR Tower Defence, where there is only one tower, and you’re sitting on top of it
  • Minions come from the distance to attack your tower
  • Your only defence? MAGIC
  • Craft spells using our modular glyph drawing system (48 unique spells)
    • Chose your spell type (Beam, Lobbed, Point)
    • Chose your element (Fire, Ice, Earth, Lightning)
    • Chose your modifier (Split, Cluster, Bouncy, Explosion)
  • Gesture recognition using AirSIG
  • Made in Unity3D using OculusVR

This was a really fun project, and very educational as well, since I was the lead programmer for the team with 3 other programmers working alongside me.

We also learned a lot about feature creep, and keeping expectations simple from the start (we originally planned 128 unique spells and 3 schools of magic)

The game can be downloaded here: Google Drive