Coding, Geometry Joys, JavaScript, Milestones, Murderous Maths, Simon teaching, Simon's Own Code, Simon's sketch book

Space-filling Curves in p5.js.

Simon prepared this project as a community contribution for The Coding Train (Simon came up with his own way to draw the Hilbert Curve and added interactive elements to enable the user to create other colourful space-filling curves (Hilbert Curve, Z-order Curve, Peano Curve and more!). You can see Daniel Shiffman’s Hilbert Curve tutorial and coding challenge on The Coding Train’s website (including a link to Simon’s contribution) via this link: https://thecodingtrain.com/CodingInTheCabana/003-hilbert-curve.html

Interactive full-screen version, allowing you to change the seed and the grid size: https://editor.p5js.org/simontiger/full/2CrT12N4

Code: https://editor.p5js.org/simontiger/sketches/2CrT12N4

Screen shot of The Coding Train website with a link to Simon’s contribution
Contributing, Geometry Joys, Group, Math and Computer Science Everywhere, Math Riddles, Milestones, Murderous Maths

Simon solving Brilliant's daily challenges

Simon keeps thoroughly enjoying Brilliant’s approach to intelligence and learning (even though he sometimes dislikes the way the daily challenges are formulated). His latest stats:

From the courses he has done most I conclude he’s mostly into Computer Science and real world problem solving at the moment:

Below are some screen shots of the daily challenges he was especially curious about lately and also excerpts of his taking part in Brilliant’s discussions:

Simon contributing to the discussion of the January 2 challenge
January 13 challenge

I noticed it’s a cyclic quadrilateral and I know that the opposite angles of a cyclic quadrilateral have to add up to 180 degrees. At first I thought: How am I even going to go about doing it, because it’s so cryptic and so full of information. But once I solved it, it actually became quite easy to draw!

February 4 challenge
Biology, Coding, Experiments, JavaScript, Milestones, Simon teaching, Simon's Own Code, Simon's sketch book

Evolving Creatures in p5.js

Simon’s latest independent coding project involved some biology lessons! He loves the channel Primer by Justin Helps and watched his evolution series many times, studying the rules for species’ survival and multiplication. This resulted in two interactive evolution simulations, in both of which Simon recreated the rules he learned. The first simulation doesn’t involve natural selection and is based on these two videos: Simulating Competition and Logistic Growth and Mutations and the First Replicators.

Full Screen interactive version: https://editor.p5js.org/simontiger/present/MK4b75542

Code: https://editor.p5js.org/simontiger/sketches/MK4b75542

Simon added natural selection in Part 2, based on Primer’s video Simulating Natural Selection (the code Simon wrote from scratch):

Full Screen interactive version: https://editor.p5js.org/simontiger/present/68WXliTza

Code: https://editor.p5js.org/simontiger/sketches/68WXliTza

Logic, Machine Learning, Milestones, Murderous Maths, Notes on everyday life, Set the beautiful mind free, Simon's sketch book

Learning to See. On Machine Learning and learning in general.

December was all about computer science and machine learning. Simon endlessly watched Welch Labs fantastic but freakishly challenging series Learning to See and even showed me all the 15 episodes, patiently explaining every concept as we went along (like underfitting and overfitting, recall, precision and accuracy, bias and variance). Below is the table of contents he made of the series:

While watching the series, he also calculated the solutions to some of the problems that Welch Labs presented, like the question about the number of possible rules (= grains of sand) for a simple ML problem if memorisation is applied. His answer was that the grains of sand would cover all land on earth:

Simon loved the historical/philosophical part of the course, too. Especially the juxtaposition of memorising vs. learning, the importance of learning to make assumptions, futility of bias-free learning, and the beautiful quotes from Richard Feynman!

screenshot from Welch Labs Learning to See [Part 5: To Learn is to Generalize]

I have since then found another Feynman quote that fits Simon’s learning style perfectly (and I believe is the recipe to anyone’s successful learning as opposed to teaching to the test): “Study hard what interests you the most in the most undisciplined, irreverent and original manner possible.” We have discussed the possibilities of continuing at the university again. I have also asked Simon how he sees himself applying his knowledge down the road, trying to understand what academic or career goals he may have set for himself, if any. Does he have a picture of himself in five years from now, where does he want to be by then? He got very upset, just like when asked to sum himself up in one sentence for an interview last spring. “Mom, I’m just having fun!”

A beautiful humbling lesson for me.

Crafty, Geometry Joys, Group, Milestones, motor skills, Murderous Maths, Notes on everyday life, Simon teaching, Simon's sketch book

MathsJam Antwerp 18 December 2019

Simon had a wonderful time at MathsJam Antwerp again. One of the problems was something he was already familiar with – the puzzle about hanging a painting using two pegs so that it would definitely fall if one removes any of the two pegs. He explained the way to solve this problem in an abstract way (turning pegs into strings, using knot theory and compiling the algorithm). Later the same evening, he developed a new algorithm to solve the same problem for three pegs and successfully demonstrated the result on his own shoe laces. His solution was the most efficient/ elegant in the group and his enthusiasm was very catchy, the audience said.

In the video below, Simon at first fails to apply his solution correctly, but succeeds upon the second attempt:

Coding, Contributing, Group, JavaScript, live stream, Milestones, Notes on everyday life, Simon teaching

How Simon takes part in the Coding train live sessions

Every live session Daniel Shiffman mentions Simon several times, usually because Simon gives good feedback/ advice. On the other end, Simon is invigorated and jumping about the room. Sometimes resulting in serious bumps against the furniture.

Coding, Experiments, Math Tricks, Milestones, Murderous Maths, Notes on everyday life, Python, Simon's Own Code, Simon's sketch book

Simon's Formula to Check Triangle Numbers

Simon spent the morning of December 5 pondering about how to test whether a number is a triangle number. “To test if something is a triangle number: double it, ask if it’s a multiple of its own square root. If that square root has a decimal, round it down”. This was his initial hypothesis, later discarded.

Simon jotting equations on a piece of cardboard while I drag him to his French lesson as we’re running desperately late. I feel bad about interrupting his train of thought.

Another formula he came up with was if n is even, m is a triangle number. After we got back home, he quickly wrote some code to check it:

Geometry Joys, Math Riddles, Milestones, Murderous Maths, Notes on everyday life, Physics, Simon teaching, Simon's sketch book

The Ladder Problem

Simon saw this thumbnail (by the channel Mind Your Decisions) among the YouTube recommended videos and sat down to solve it, without watching the video, so that he doesn’t see the solution before he comes up with his own.

Simon drawing out the solution in Geogebra
Logic, Math Riddles, Milestones, Murderous Maths, Simon's sketch book

Too Many Twos Solution Proof

Simon has come up with an equation to solve the Too many Twos, the puzzle mode of the Add ‘Em Up game:

x is the number of twos I used to clear out just a single two at a time

y is the number of twos I used to clear out six twos at once.

We have two pieces of information. At the beginning, the twos are arranged in a pattern with 40 twos in it. And the number of twos I can use to clear out the whole grid is 25.

x + 6y = 40

x + y = 25

We thought we solved it, but no! The reason why is because of the way the twos are arranged there were spots where there were exactly 6 twos neighbouring an empty cell. And there was only one spot where there wee more than 6. Our equation says that there must be 3 of those. the way I solved this problem was by considering a third variable, z = the number of twos that I place without clearing any twos in the grid. So now our two equations look like this:

x + 6y – z = 40

x + y + z = 25

With a little bit of cleverness though, we know that these are all integers. You don’t have 2.7 twos! That doesn’t exist! Which means that we can use some number theory to narrow it doen. After solving these equations we get: x = 25 – y – z and y = 3 + 2z/5

We’ve got a fraction. We need to carefully choose the z for this to result in an integer! This is only true if z is divisible by 5.

I don’t want to check infinitely many solutions. Luckily, we know one more quite obvious thing: all of our variables must be positive. So if z gets too large, x will become negative. How large? Let’s just be lazy and use trial and error. Let’s draw a table. In our table we now only have four solutions that we need to check. The first one, with 0 z‘s, clearly doesn’t work.

Coding, Logic, Math and Computer Science Everywhere, Milestones, Simon teaching, Simon's sketch book, Together with sis

Solving Logical Puzzles

The end of 2019 was packed with logic. Simon even started programming an AI that would solve logical puzzles, here is the beginning of this unfinished project (he switched to programming a chess AI instead). In the two vids below, he explains the puzzle he used as an example and outlines his plan to build the AI (the puzzles come from Brilliant.org):

And here are some impressions of Simon working on the puzzles and showing them to his sis: