This year I decided to learn about coding, with the original intention of coding in Java, but I ended up doing some work in C# as well. Now that In-Depth is coming to a close, here’s a summary of my journey! The two big “artefacts” that I have to show today are a calculator and a chess AI program, which I ended up spending most of my time on, especially near the end of the project.
First, I want to give a big thanks to my mentor, Steven Zhang. He helped me a lot with my learning and I couldn’t have done this project without him. He taught me many coding techniques and gave me tons of great resources so I could learn outside of meeting time as well.
Calculator and chess AI
I don’t want to waste too much of your time, so I’ll get straight into some details. Here’s a PowerPoint where I explain my calculator and chess AI at a high level.
If you want to download my calculator and try it for yourself, here’s the link. Note that you will need Java Runtime Environment to run the calculator.
If you want to download my chess AI and try it for yourself, here’s the link. Download the whole folder containing the exe file, the data folder, as well as the MonoBleedingEdge folder. Then, extract everything and run the .exe file (the one with the chessboard icon). First, I have to mention that the chess game is not mine. I borrowed someone’s project on GitHub for the chess game. This was an effort to reduce the time I spend working on the chess game so I could have more time to work on the AI (sometimes called a chess engine) part, which is what I wanted to focus on more. My chess engine is still sort of a work in progress and is really slow, so it runs on depth 2 (plies) for now. It should take about 10-20 seconds to make a move. The amount of moves the AI has to search increases exponentially with the max search depth with an average branching factor of about 30, so the engine is absurdly slow at higher depths. In the future, I plan to improve it with something called bitboards. Be aware that there may be some glitches I missed as well.
If you have the time and are interested, here is the chess engine at depth 3. It may take a minute or even more to make a move, so I would recommend just trying it out at depth 2. However, the AI will be significantly stronger at depth 3.
Here is the link to my GitHubRepository for the calculator, in case you’re interested in the source code. The final version is in the “Recursive” branch.
Here is the link to my GitHub repository for the chess engine, in case you’re interested in the source code. The actual C# files are in Assets > Scripts > Classes and Assets > Scripts > UI.