It’s Sinterklaas season in the Dutch-speaking world and, of course, as we have started baking the traditional spiced cookies called kruidnoten (“gingerbread buttons”) Simon didn’t want to miss an opportunity to play a version of peg solitaire with eatable pieces!
Simon loves the Maths Is Fun website and has borrowed a couple of ideas for cool games from there. He wrote the code completely on his own, from scratch. Below is a video where he presents his Connect games:
I’ve gone Connect Crazy!
This project is inspired by MathsIsFun, which has a lot of variations on the classic game Connect Four, the code is entirely mine.
Classic Game of Connect Four: https://editor.p5js.org/simontiger/full/TISsTqZ8D
And then I’ve made Connect Three: https://editor.p5js.org/simontiger/full/c30Oqd4Qf
And Connect Five: https://editor.p5js.org/simontiger/full/I6Digth0A
Then I’ve also made a version called Drop, where if the bottom row fills up, the whole board drops down one row:
Another game Simon built was Bulls and Cows (trying to guess a sequence of letters): https://editor.p5js.org/simontiger/full/3bC9j3501 Link to Simon’s code: https://editor.p5js.org/simontiger/sketches/3bC9j3501
Yet another one was a Reaction Time test! You can test your reaction time by clicking anywhere on the screen as soon as the circle changes color: https://editor.p5js.org/simontiger/full/Gzv094mgzM Link to Simon’s code: https://editor.p5js.org/simontiger/sketches/Gzv094mgzM
And last but not least, an unfinished project of building a Checkers game:
Simon has worked really hard for several days on his first machine learning community contribution! He has created this mini-series about building a game of Make 24 with Google’s Teachable Machine that he trained to recognise gestures as a game controller.
“It’s the first time I’m using ml5 from scratch! I’ve also built in a feature to enable the users to train their own models!”
Link to my ml5 project: https://editor.p5js.org/simontiger/full/McNY2_ay_
Link to my game of Make 24 without ml5/Teachable Machine: https://editor.p5js.org/simontiger/full/qH_ZSvup5
Simon has been fascinated by these possible-impossible puzzles (that he picked up from the MajorPrep channel) for a couple of days. He prepared many paper visuals so that Dad and I could try solving them. This morning he produced this beautiful piece of design:
This is a project that Simon started a few weeks ago but never finished, so I think it’s time I archive it here. It’s based upon this wonderful Numberphile video, in which Ben Sparks shows a curious math problem – a game of cat and mouse – in a computer simulation he’d built. The setting is that the mouse is swimming in a round pond and is trying to escape from a cat that is running around the pond. What is the strategy that the mouse should apply to escape, considering that it swims at a quarter of the speed the cat runs?
Simon came up with his own code to recreate the simulation from the Numberphile video. In the four fragments I recorded, he showcases what he has built. Please ignore my silly questions, at the time of the recording I hadn’t viewed the Numberphile video yet and had no idea what the problem entailed.
Simon opened up a genetic algorithm game he built about two years ago and made a fascinating discovery: one of the organisms seems to have become immortal! Simon has called his discovery “The Everlasting Vehicle” and saved the vehicle’s DNA.
Links to the game on GiHub:
Original code: https://github.com/simon-tiger/steering-behaviors-evolution
p5.js version: https://simon-tiger.github.io/Game_SteeringBehaviorsEvolution/SteeringBehaviours_EvolutionGame_p5/
The last time I ran the program is a couple of hours ago. Everything died out, except for one vehicle.
I have programmed this with a genetic algorithm. They have a DNA with 4 genes.
Attraction/Repulsion to food
Attraction/Repulsion to poison
How far it can see food
How far it can see poison
They also have a health, which goes down over time. If they eat food, then their health goes up, if they eat poison, then their health suddenly goes down. A good health is 1, and a bad one is 0.
So what was The Everlasting Vehicle’s DNA and health?
Attraction/Repulsion to food 1.9958444373034823
Attraction/Repulsion to poison 1.3554737395594456
How far it can see food 53.31017416626768
How far it can see poison 23.33902221893798
Average health ~397
So it attracts to poison, yet its health is approximately 397 times bigger than a very good health! And better yet, it even lasted for a couple of hours so far!!!
Inspired by Daniel Shiffman’s Evolutionary Steering Behaviors Coding Challenge
Link to the Challenge: https://www.youtube.com/watch?v=flxOkx0yLrY
Link to the project in progress on GitHub: https://github.com/simon-tiger/2048
Simon has started building his own 2048 game. In the two videos below he explains the initial stages of the project and how he has created the tiles. At the moment, he plans to build a classic 2048 first and create a few desktop versions of more exotic variations of 2048 later.
The number of collisions between two objects equals a number of digits of Pi. The code on GitHub: https://github.com/simon-tiger/Pool_Pi
From where I got this
I called this sketch Pool_pi because the original paper about this (written in 2003) was called something like Pi in Pool. I learned about this from a recent 3Blue1Brown series:
The idea is 2 blocks on a frictionless surface. One slides towards the other, that is facing a wall. All collisions are perfectly elastic.
If the two blocks have the same mass, you can quickly calculate that there will be 3 collisions.
If the one block is 100x the other, it just so happens that there will be 31 collisions.
If the one block is 10000x the other, there will be 314 collisions (I get tired of making graphics). If the one block is 1000000x the other, there will be 3141 collisions.
In my own code, I first used Box2D.
It worked for mass ratios of 1 and 100, but it didn’t work for 10000.
Then I started writing my own physics engine, hoping to fix this issue. But it was even worse.
I couldn’t even get 100 to work.
Then I figured that the blocks are colliding too frequently. So I slowed the 1st block down.
I could get 100 to work this way, but not 10000.
Can anybody help to fix this issue?
I borrowed part of the code from here: https://processing.org/examples/circlecollision.html
Simon saw this design in a video by Mathologer and adapted it slightly (Mathologer used glue and no screws). He had dreamt of making a cube like this for months, but the idea of crafting one from wood seemed too complicated. Today it occurred to him that he can make the design using his new woodlike foam and press iron screws into the foam to hold the magnets! On to the wooden model now!
Although vacation is a vague notion in our family, where days are devoted to doing favourite things 365 days a year. For Simon, that means that his days are filled to the brim with science experiments, practicing math and devouring books and videos on quantum mechanics, also when he is on vacation (away from home). The past three weeks in Southern France and Spanish Sitges also involved a lot of swimming and enjoying the outdoors of course, but science remains Simon’s top priority. He also felt like he had grown unaccustomed to the beach overkill (while at home, we only went to the beach something like once a week max) and couldn’t bear the sand sticking to his wet feet for a while. By the time we settled at our Spanish Airbnb he gradually got acclimatised to this continuous sensory ordeal though and I was happy to see him relax at the seashore, especially on the last day of our stay. He had spent about two hours in the water (experimenting with vortices, swimming after a ball and just playing silly), and didn’t even want to get the sand off his feet anymore. We just sat there on the beautiful retro beach in Sitges, hugging and watching the sea, in absolute tranquility. Simon had even forgotten that Daniel Shiffman’s live stream was due that evening!
Made a lot of “binary calculators” (above)
Helped little sis learn fractions
Introduced little sis to infinite fractions
Checked out his new lathe tools and tried sawing
Experimented a whole lot (with surface tension, forces, water and gases)
Yet another experiment
Followed tutorials by Physics Girl, Up and Atop, PBS Space Time, Veritasium, Reactions, PBS Infinite Series
Loved his new Larry Gonnick Calculus book and did quite a lot of… Calculus. It was quite funny when a restaurant owner noticed Simon differentiate at dinnertime and was very impressed. He trend out to be a former high school science teacher. Interesting how Simon’s giftedness is usually only openly appreciated by those who have some understanding of the subjects he elaborates upon. People with less understanding show less tolerance, like a guard at the French swimming pool who told us off and snatched Simon’s (clean) plastic plate away, not allowing Simon to carry out his beloved vortices experiment in the public pool (resulting in a huge meltdown and Simon being afraid the pool would close or change rules every day).
Launching propeller rockets on the beach
Simon’s first chemical equations. He first thought they worked like linear equations 🙂
More Physics Girl inspired experiments
Favourite one: burning matches in a glass results in all the water in a shallow plate getting sucked into the glass (water level rising). Has a physical and a chemical explanation!
Favourite evening activity
Loving the waves