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

Experiments, Murderous Maths, Notes on everyday life, Simon makes gamez, Simon teaching

2048 Cookies

We devoted the beginning of January to a goofy stop-motion project: Simon and I baked 2048 cookies! No, we didn’t bake over two thousand cookies! We only baked and decorated a little over a hundred of them, Simon had calculated that that would be enough to play the 2048 game… with cookies. Simon came up with all the editing tricks to make this project work. In the video, he also explains his winning strategy and confesses he has made another attempt to program the game, without me knowing it. Apparently, that’s how he first came up with the idea to bake the cookies, by looking up pictures of 2048 while programming and stumbling upon this blog.

Here is a link to Simon’s previous attempt to program 2048, about a year ago (he got pretty far).

Simon calculated how many cookies we needed and came up with a colour scheme
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:

Coding, Crafty, Experiments, Geometry Joys, JavaScript, Math and Computer Science Everywhere, Math Riddles, Milestones, Murderous Maths, Notes on everyday life, Simon makes gamez, Simon teaching, Simon's Own Code, Simon's sketch book

Approximating pi and e with Randomness

This has been one of Simon’s most ambitious (successful) projects so far and a beautiful grand finale of 2019, also marking his channel reaching 1K subscribers. The project – approximating Euler’s number (e) in a very weird way – is based upon a Putnam exam puzzle that Simon managed to prove:

The main part of the project was inspired by 3Blue1Brown Grant Sanderson’s guest appearance on Numberphile called Darts in Higher Dimensions, showing how one’s probable score would end up being e to the power of pi/4. Simon automated the game and used the visualization to approximate e. Below is the main video Approximating pi and e with Randomness. You can run the project online at: https://editor.p5js.org/simontiger/present/fNl0aoDtW

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

The history and the math behind the project:

Simon’s proof od the math behind the project:

Simon has visualized this problem and proof at: https://editor.p5js.org/simontiger/present/2uMPZ8THW

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

Coding, Crafty, Experiments, JavaScript, Math and Computer Science Everywhere, Milestones, Murderous Maths, Physics, Simon teaching, Simon's Own Code, Simon's sketch book

Galton Board in p5.js

Simon saw a prototype of this Galton Board in a video about maths toys (it works similarly to a sand timer in a see-through container). He created his digital simulation using p5.js online editor, free for everyone to enjoy:

https://editor.p5js.org/simontiger/sketches/h7p-wZCw8

Coding, Computer Science, Experiments, JavaScript, Logic, Murderous Maths, Simon teaching, Simon's sketch book

Nash Equilibrium

Simon explaining the Nash Equilibrium with a little game in p5.js. Play it yourself at: https://editor.p5js.org/simontiger/sketches/lfP4dKGCs
Inspired by TedEd video Why do competitors open their stores next to one another? by Jac de Haan.

Electronics, Engineering, Experiments, Milestones, Physics

More Engineering. RAM Ready in the simulated 8-bit computer project in Circuitverse.

In October and early November, Simon was busy with another attempt to simulate SAP-1 (simple as possible processor, an 8-bit computer) in Circuitverse (something that he hadn’t managed to complete when he tried it last time). I’m not even sure if anyone uses Circuitverse for such large-scale projects.

Main

On November 7, Simon finally managed to finish the RAM on his simulated 8-bit computer (a computer where every general-purpose register contains 8 bits and therefore can only process 8 bits of data)! Although he is far from the end of the project, he is convinced that the RAM is the hardest part, so “now everything is going to be okay!”

“RAM was the hardest mainly because I have been trying to build the subcircuit for the RAM myself, which is not going to do it for SAP-2”,(Simon’s next ambition, also an 8-bit computer but with 64K memory, 2K PROM + 62K RAM). “This time the RAM I needed was particularly small, so I built a mini-RAM myself”.

The most difficult part, half of the mini-RAM. It doesn’t contain 16 bites, it contains 16 4-bit words or “nibbles” of memory

You can view and launch this (unfinished) project via this link: https://circuitverse.org/users/7241/projects/35775

All of Simon’s projects on his Circuitverse page: https://circuitverse.org/users/7241

Simon’s current plan is to record a series of videos based on the Digital Computer Electronics book he uses as a guide in his engineering projects.

Simon compiling a plan (in Microsoft Paint) based on the Digital Computer Electronics book contents

These are some simpler circuits from late September, simulated on Tinkercad:

Test circuit in Tinkercad on 30 September 2019
Test circuit in Tinkercad on 30 September 2019
JK Flipflop to create simple clock module in Tinkercad on 30 September 2019
Coding, Community Projects, Contributing, Experiments, JavaScript, live stream, Machine Learning, Milestones, Physics, Simon's Own Code

Simon’s Random Number Generator

This one’s back from mid-October, forgot to post here.

Simon created a random number generator that generates a frequency, and then picks it back up. Then, it calculates the error between the generated frequency and the picked up frequency. This is one of my community contributions for a Coding Train challenge: https://thecodingtrain.com/CodingChallenges/151-ukulele-tuner.html

Link to project: https://editor.p5js.org/simontiger/sketches/eOXdkP7tz
Link to the random number plots: https://www.wolframcloud.com/env/monajune0/ukalele%20tuner%20generated%20random%20number%20analysis.nb
Link to Daniel Shiffman’s live stream featured at the beginning of this vid: https://youtu.be/jKHgVdyC55M

plot of the random numbers generated by Simon’s ukulele tuner random number generator (plotted in Wolfram Mathematica)
Crafty, Electricity, Electronics, Engineering, Experiments, Geometry Joys, Notes on everyday life, Physics, Simon teaching, Together with sis

Vanishing Letters

Simon’s way to celebrate Helloween: a little demo about how red marker reflects red LED light and becomes invisible. A nice trick in the dark!

We also had so much fun with the blue LED lamp a couple days ago when Simon discovered that it projects perfect conic sections on the wall! Depending on the angle at which he was holding the lamp, he got a circle, an ellipse, a hyperbola and a parabola! Originally just a spheric light source we grabbed after the power went out in the bathroom, in Simon’s hands the lamp has become an inspiring science demo tool.