art, Crafty, Geometry Joys, Math and Computer Science Everywhere, Math Riddles, Murderous Maths, Notes on everyday life, Simon makes gamez, Simon teaching, Simon's sketch book, Together with sis

Math puzzles: Is it Possible?

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:

Simon showing one of the puzzles to another parent while waiting for Neva during her hockey training
Simon’s original drawing of the doors puzzle. The solution of the puzzle is based on graph theory and the Eulerian trail rule that the number of nodes with an odd degree should be either 0 or 2 to be able to draw a shape without lifting your pencil. The number of rooms with an odd number of doors in the puzzle is 4 (including the space surrounding the rectangle), that’s why it’s impossible to close all the doors by walking though each of them only once.
Simon explaining odd degree nodes
Coding, JavaScript, Math Riddles, Murderous Maths, Simon makes gamez, Simon teaching, Simon's Own Code

Cat and Mouse

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.

Biology, Coding, Java, JavaScript, Milestones, Simon makes gamez, Simon's Own Code

Simon has created an “immortal” organism?

The organism is the green triangle on the left

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:
p5.js version:

Simon writes:
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?

Property Value
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:

Coding, JavaScript, Simon makes gamez, Simon's Own Code

Simon’s own 2048

Link to the project in progress on GitHub:

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.

Coding, Java, Milestones, Murderous Maths, Physics, Simon makes gamez, Simon teaching, Simon's Own Code

Simon’s code for an intriguing problem from the 3Blue1Brown math channel

The number of collisions between two objects equals a number of digits of Pi. The code on GitHub:

Simon writes:

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:

1st video:
2nd video:
3rd video: [not out yet]

The idea
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.

That’s pi!

The issue!
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:

Crafty, Geometry Joys, Physics, Simon makes gamez, Simon teaching

Simon made his own foam Rubik’s Cube

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!

chemistry, Exercise, Experiments, Good Reads, Milestones, motor skills, Murderous Maths, Notes on everyday life, Physics, Simon makes gamez, Simon's sketch book, Together with sis, Trips

Looking back at the vacation

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!

dsc_06646749091631384876171.jpgMade a lot of “binary calculators” (above)

dsc_08098571406704053720752.jpgHelped little sis learn fractions

dsc_07972979319674618445058.jpgIntroduced little sis to infinite fractions

dsc_06271192208290101593530.jpgChecked out his new lathe tools and tried sawing

dsc_06877459075749954970581.jpgExperimented a whole lot (with surface tension, forces, water and gases)


dsc_07585635002843708540665.jpgYet another experiment

dsc_08371515643779040846973.jpgFollowed 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).











dsc_09612735924853232773240.jpgLaunching propeller rockets on the beach

dsc_09071976964664774880504.jpgSimon’s first chemical equations. He first thought they worked like linear equations 🙂

dsc_08943237920924875579728.jpgMore Physics Girl inspired experiments

dsc_09108778766156185324596.jpgFavourite 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!

dsc_08732805749892983265193.jpgFavourite evening activity

dsc_09114093660143972351481.jpgLoving the waves

Coding, JavaScript, Simon makes gamez, Simon teaching

Live Stream #18. Living Code, Chapter 6: Particle Systems. 99 Balls Game.

Simon says: “In this live session, I am continuing Chapter 6 of my “Living Code” Course. This is the 4th live stream that I’m attempting to do this”. It was a tough one again, many thanks to Nahuel José for helping Simon out with an error! In the end Simon did manage to finish the second video in Particle Systems, but got another error in his third video in this chapter, so please feel free to help out if you have a minute to look at his code:

Simon also started working on a “99 Balls” game. The next stream will be in two weeks, on July 24!