Inspiration
We are a group of beginners to programming and we've learned the basics of python from resources on the internet. Although we learned it, We wanted to do create something that validates and progresses our learning experience in the real world and serve as a motivation to learn more.
What It Does
It is a basic TIc Tac Toe game, with a GUI built using the tkinter module. In addition to playing with a friend it has also an option to play against and try to beat the impossible computer.
How We Built It
In the beginning our only intention was to learn to create a GUI that can take inputs from the mouse button and call functions accordingly, In other words, initially we had meant it to be a simple Tic Tac Toe game which you could only play with your friend.
When we finally reached the point where the goal was accomplished, we showed to our family and friends who were supportive, but in all wouldn't prefer it against playing it on a piece of paper, i.e it was not engaging enough.
That is when we decided to create a computer to play against, initially the computer would just choose any random box among empty boxes to select from.
Then we added code the computer part to stop the human player from winning by choosing the third winning box if two were taken by the human player, and to chose the third box if the computer had already chosen a winning two. but still, that nowhere near made it interesting.
So we taught the computer to perform deadlocks that can guarantee a win, but always there was a way around that if the human could perform those deadlock first.
Next up, we taught the computer to counter human deadlocks.
Then again we tested it by making it go against very smart people. The computer did lose, but each time it did, We noted the moves (collected data) which ended in the computer losing and taught it how to counter it. This went on for a few times until no one we knew of could beat the computer.
Challenges We Ran Into
Whenever we taught the computer something new, It often broke the old strategies the computer was programmed to use. We had to code in a way that didn't affect the previous algorithm.
Accomplishments That We're Proud Of
As this was our first real project that involved any programming , it is for us a peek at the possibilities and opportunities that programming can offer.
It required hard reasoning and logical thinking, and we are really happy that we didn't give up in between although there were times when we thought this wouldn't work.
Used math we learned in grade 11, which many people said we would never XD.
What We Learned
Learned how to create GUI using tkinter.
Learned how to take user inputs in the form of buttons, and call functions accordingly in real time.
Learned how to Object Orient (Although we am nowhere near perfect, we have an idea now at the very least).
What's Next For The Impossible Tic Tac Toe Game
Can be developed further, give a bit more attractive UI, mainly we only focused on the back end for this project. The front end has a lot of improvements to be made.
Can add an option to enter players name and store his/her scores in a database.
Can add an option for the player to choose between X and O, for now the player is X and the computer is always O.
Note
While trying it out, please make sure you have the 'Pillow' Module installed.



Log in or sign up for Devpost to join the conversation.