Simon turned 8!

For his 8th birthday, Simon made a present for himself in Node.js and spoke about his new year’s resolutions that mainly involve live streaming:

Today, two days later, we actually managed to test stream! Both of us had no idea how live streams work and thought we would have to install expensive encoders to enable streaming. It turned out to be much easier than we expected, although it took us a couple of hours (and tears on Simon’s behalf) to figure it out. So there will be live streams coming shortly! By the way, if you haven’t done so yet, please subscribe to Simon’s YouTube channel (well it’s actually my channel, but it’s about Simon). When he has over 100 subscribers, he can stream from mobile devices which would be handy.

DSC_1186 - kopie

DSC_1218 - kopie

DSC_1235 - kopie

DSC_1243 - kopie

Simon says he had a bad birthday this year, but here were a few things he did like and above all, a new Murderous Math book, “Shapes and Sizes” (he is holding it on the photo above).

Time to change the tags to “8 year old programmer”!

At Het Pass in Mons (Bergen)

Simon is not really into museums. He prefers to learn things at his own pace and dislikes crowds. The pictures below are from our visit to Het Pass, a science museum in Wallonia, near the French border. The museum is situated in what formerly were mining facilities, the exhibits are interactive, spread out in several oddly shaped buildings connected by industrial bridges and escalators. I believe Simon actually enjoyed the electricity and the genetics rooms, even though the two of us got struck by the electricity from the plasma ball  (painful!):

DSC_1089

DSC_1090

DSC_1098

DSC_1102

DSC_1111

Evolutionary Steering Behaviors Game

Note: See the update at the bottom of this post!

We’ve had quite a dramatic situation here for the past couple of days, after Simon turned Daniel Shiffman’s Evolutionary Steering Behaviors Coding Challenge into a game in Processing (Java) and then also in JavaScript (with p5). After completing the game in JavaScript, Simon wanted to add a new feature – a checkbox he programmed using the p5.js library. The checkbox would give the player the option to play with or without the timer, adjust the timer and also had a “New game” button. In the end it turned out that the checkbox didn’t really work. Simon was very upset and it took me hours to talk him into putting the game online even though the checkbox didn’t function (he wanted everything to be perfect) and ask for advice. “I have got a problem with a p5 element: In my setup function, I defined my checkbox. In my reset function, my checkbox is undefined. Why?” – Simon asked in the “Share Work” section of the Coding Train Slack channel, where he has the opportunity to communicate with experienced programmers. He received quite a lot of help and was enthusiastic about it at first, but for some reason, he hasn’t tried the solutions he was suggested. Perhaps it’s his gut feeling that the bind function suggested is still too difficult at the moment. I have decided not to push anymore and trust him on this one, although it’s always a dilemma for me whether I should sometimes “force” him into taking instructions from others or let him solely rely on his fantastic intrinsic autodidact mechanisms. The second seems to work better in terms of the learning process, but I do push him into sharing his work.

Evolutionary Steering Behaviors game. Asking help in Slack 10 Jul 2017 3Evolutionary Steering Behaviors game. Asking help in Slack 10 Jul 2017 4Evolutionary Steering Behaviors game. Asking help in Slack 10 Jul 2017 5Evolutionary Steering Behaviors game. Asking help in Slack 10 Jul 2017 6Evolutionary Steering Behaviors game. Asking help in Slack 10 Jul 2017 7Evolutionary Steering Behaviors game. Asking help in Slack 10 Jul 2017 8

Evolutionary Steering Behaviors game. Asking help in Slack 10 Jul 2017 2

Simon’s game is online at: https://simon-tiger.github.io/Game_SteeringBehaviorsEvolution/SteeringBehaviours_EvolutionGame_p5/

In the videos below Simon shows how he made the game. It’s an ecosystem type of genetic algorithm (with no generations), where the organisms (autonomous steering agents) clone themselves. The autonomous steering agents evolve the behavior of eating food (green dots) and avoiding poison (red dots). Simon added two invaders into the game, one giving food and the other randomly spreading poison. The player can control the “good” invader by moving him and making new food. The goal of the game is to make the agents survive for as long as possible.

The Processing (Java) version:

The thinking behind the game (Simon explains everything at the whiteboard):

The JavaScript version (now online):

In the last video, Simon talks about his problem with the p5 element.

 

Evolutionary Steering Behaviors game seek algorithm part 1. DESIRED equals TARGET minus POSITION:

Evolutionary Steering Behaviors game seek algorithm part 1. DESIRED equals TARGET minus POSITION 4 Jul 2017

Evolutionary Steering Behaviors game seek algorithm part 2. STEERING equals DESIRED minus VELOCITY:

Evolutionary Steering Behaviors game seek algorithm part 2. STEERING equals DESIRED minus VELOCITY 10 Jul 2017

UPDATE: When Simon saw Daniel Shiffman’s comment on Slack this morning (Daniel saying Simon did a fantastic job and that he might even include Simon’s game in the next Live Stream), he sat down and applied the bind function as suggested by his older peers above – without any incentive on my behalf! And it worked! I think we’ve hit a true milestone again. Simon has this growing feeling that he’s got friends out there, his tribe, who understand and who are ready to help.

One day later: Simon had another chat with his friends on Slack and got a lot of help with the last remaining small bug in his game (the New Game button didn’t start a new game if the player had chosen to play with no timer but jumped to Game Over instead). In the video below, Simon shows how that problem got solved:

And some of the latest quotes:

Simon talking to himself in English, lying on the floor under his desk, his chair upside down next to him: “Am I also 4D? Probably, because I live through time…”

***

Originally in Russian, very excited: “Mom, did you know it’s a geometrical progression? The A in the first-lined octave is 440Hz, in the second-lined octave it’s 880 Hz and in the third-lined octave – I don’t remember exactly, but how much is 880 times 2? Yes! 1760 Hz!”

Back to Python (and C#)!

Simon was preoccupied with vector functions for most of the day on Saturday, compiling what, at first site, looked like a monstrously excessive code in Processing (he recycled some of it from the Processing forum, wrote some it himself and translated the rest from Codea). Originally, he was gong to use the code to expand the 3D vector animation he made into a roller-coaster project he saw on Codea and wanted to create in Processing, but got stuck with the colors. What happened next was fascinating. In the evening I all of a sudden saw Simon write in a new online editor Repl.it – he was translating the vector code into… Python! He hadn’t used Python for quite a while. I don’t know what triggered it, maybe Daniel Shiffman noting last night during the live stream session that “normal people use Python for machine learning”. Simon also said he had sone some reading about Python at Python for Beginners and Tree House!

He isn’t done with his project in Python yet, but here is the link to it online: https://repl.it/JAeQ/13

Here Simon explains what he is writing in Python:

Simon did the 2D, 3D and 4D classes but eventually got stuck with the matrix class in Python. He then opened his old Xamarin IDE and wrote the 2D, the 3D and the 4D classes in C#. In the video below he briefly shows his C# sketch and talks about Cross Product in general:

And this is a video he recorded about vector functions (in Processing, Java) the day before:

Coding Train

Yesterday Simon got a parcel from the US: Simon’s hero, NYU professor Daniel Shiffman sent him a beautiful gift – a Coding Train shirt! Coding Train is Daniel Shiffman’s channel on YouTube where he records tutorials, coding challenges and live streams. Basically, Coding Train has been Simon’s main learning source in Programming, Math and Physics (and English!) for months.

DSC_0536

DSC_0537

DSC_0538

DSC_0539