This is an individual project which I was working on in 3-4 weeks. When I was working on this project, I decided not to publish any blog posts so that I could focus on it. I knew that I would learn lots of things in this project and I would share that with you after finishing the “first’ version of it. Therefore, I will introduce my individual project in this post. Let’s get started!!
The MyQA game is my custom program for the High Distinction task in the Object-Oriented Programming (OOP) unit at Swinburne University.
Technology I used in this project:
- Programming language:
- C#.Net Framework v4.7.0
- Gtk-Sharp v2.4.0
- NuGet package:
- NUnit – one of the unit testing frameworks for C#
- Visual Studio 2019 – IDE
- Git, Github – Version Control
- Trello, Toggl – Tracking tasks and time
Github Repository: https://github.com/peterdu98/MyQA (You can see the demo here)
The MyQA game is the Question and Answer game which can be used for many purposes. For example, students can use it for measuring how well they understand their school. Another useful purpose is that parents are able to know how well they understand their children.
In regard to technical motivation, I would like to apply object-oriented principles, which I learned in the university, into this project. Moreover, there is the basic concept of neural network, which I self-taught, to customize a bot in this game.
3. How the game works:
The game generates a random list of 5 questions – each question has 4 choices which are arranged in the random order. There are various topics – schooling, education, computer science, or etc.
To play the game, you have to enter your name and choose the mode of the bot you want to compete with. At the end of the game, your score will be shown on the screen and compared with the score of the bot. Aside from that, you are able to play again or exit the game after you have finished the match.
The bot is being constructed after you select its mode. It has a number of neurons which depend on the selected mode. For example, it has 10% of the total number of neurons if it is in the easy mode. Each neuron has information about 5 questions. For each question, the neuron selects randomly the choice and then computes the score for that based on its correction. After neurons are computed, the bot will select the neuron which has the highest score and that is the final score of it.
For each question, if the selected choice is correct, the score will increase by 1. Otherwise, the score will decrease by 1. If you do not select the choice within 30 seconds, the score will decrease by 1. Moreover, if you click on the ‘play again’ button at the end of the game, the score will reset by 0.
Your name and score will be saved to the text file at the in of the game. If your name exists and your current score is higher than your previous score, it will edit the score to be the higher one.
4. Download and try the game:
There are 2 ways to download and try the game.
- If you are familiar with version control, you can go to this link and clone my repository. To load the game, you need to ensure that you already installed Visual Studio Code and all required configurations.
- If you are not familiar with version control, I released the zip file for you on my Github repository. You can go to this link and download it. Again, you need to ensure that you already installed everything which is listed out.
5. What’s next?
- Blog: I will publish a series of coding posts about this project. I will show you how I did this project (version 1) step by step – from basic things to little advanced things. However, this series may not be consecutive like every single week. This is because I will do that in my free time.
- The project:
- I plan to design a database server for it. Instead of storing things in text files, those things will store in the database. This makes the game more dynamic.
- I plan to add more questions to the game and categorize those questions in a specific session. Therefore, the player can choose the desired category.
- I plan to let the player opt for the number of questions so that s/he can play less or more than 5 questions.
- Of course, the bot will be more intelligent than this version.
- I plan to move this game to the web version. I don’t know whether this is a good idea or not. By doing so, one role will be added to the game. This role allows the user to add a question to a specific category.
Thank you for reading! If you have any ideas to contribute to my project, please let me know.