Programming and Probability
In this project, we learned many different examples of probability. We were able to actually program a game to show our skills in this area. We were able to display our understanding of this topic with a virtual game. We were told to include a feature with chance and some form of probability, but the rest was up to us. We were given freedom to create the game of our choice and exhibit it to our peers and families. The goal of this project was to teach probability in a new light with programming. We did lots of work building up to this project with probabilities and ended with programming our very own game. We learned to code and were set off to create a game of our choice for exhibition.
Benchmark #1 - Game Concept
In this benchmark, we were asked to think of a game we’d like to either try to reflect or create an entirely new game. I decided to write the idea of a game I used to play as a child. The goal of the game was to trace your mouse on the line and attempt to not touch out of the lines. I wanted to design my game similar to this. I explained in full detail what I wanted it to look like and went over it with my peers for revision.
Benchmark #2 - Final Concept
In this benchmark, we gave a final design for our game. I explained in full detail how I wanted my game to turn out and what it will do. I decided to implement my previous idea, but change it for more beginner code. I added more elements of probability and chance to reach the expected benchmarks of the project. I decided to make my game a color wheel with the objective of hitting the red triangle. I figured this would add elements of chance and be very fun and interactive.
Benchmark #4 - Probability Analysis
In this benchmark, we had to calculate the actual mathematical probabilities for our video games. We had done many problems about this concept previously, but our assignment was to create our own. I had to choose a question and give and create a tree diagram to go along with it. I also had to make a two-way table for this question. My question posed was: What is the probability that, at neutral speed, you will score 10 points in your first 10 attempts? I created a tree diagram with a branch leading to the probability we were focusing on. I then created a two-way table with the options of win, lose, clicked stamp, did not click stamp. I was able to find what probabilities were in the game I created.
Benchmark #5 - Starlogo Nova Final Game
In this benchmark, we created the actual games. I got to program my own design for exhibition. For my final design, I changed my original idea. Unfortunately, it was extremely difficult to code and I had to change it in time for my exhibition. I changed it to something similar, but much easier. The game setup is a 3 x 3 grid that stamps when the button is pushed. The stamp is randomly placed on the board each round. When ‘forever’ is pushed, a square icon appears. This icon is the player. As it moves, your goal is to stop it on the stamp to gain a point. This game is equally as interactive as my first idea and I had lots of fun creating it. There is an option to view the code I used to create the game which allows it to run the way it does.
Follow these directions in order to continue to play each round:
- Press 'Run Code'
- Press 'Set Up'
- Press 'Stamp'
- Press 'Forever'
To play the actual game, hit the space bar to stop on the stamp.
A bar located in the bottom right corner adjusts the speed of the game.
Hit 'Stamp' each time game stops to continue.
- Press 'Run Code'
- Press 'Set Up'
- Press 'Stamp'
- Press 'Forever'
To play the actual game, hit the space bar to stop on the stamp.
A bar located in the bottom right corner adjusts the speed of the game.
Hit 'Stamp' each time game stops to continue.
Reflection
This project overall, was very stress inducing, but also very fun. I ran into many problems, but they all managed to work themselves out. I had lots of trouble in the beginning with programming and I didn’t think I would be able to create an entire game. I gained more confidence when I got help with my original game design, but that immediately changed when I had to come up with a new idea. I had no idea how to design a new game and the deadline was only a day away. This was extremely frightening and I didn’t believe I would complete it in time. Luckily, I had lots of help from my teacher, as well as my peers. I overcame this challenge I was facing and ended with a very fun game. I feel that I have learned a lot from this entire project and I am happy with how it turned out. I couldn’t have completed this without all of the skills I learned and I will continue to use them in my future learning.