Coding, In the Media, Machine Learning, Milestones, Murderous Maths, neural networks, Notes on everyday life, Set the beautiful mind free, Simon's Own Code

Interview with Simon on Repl.it

Repl.it has published a cool interview with Simon! It was interesting how Simon struggling to answer some of the more general questions gave me another glimpse into his beautiful mind that doesn’t tolerate crude dimensionality reductions. The first question, “If you could sum yourself up in one sentence, how would you do it?” really upset him, because he said he just couldn’t figure out a way to sum himself up in one sentence. This is precisely the same reason why Simon has had trouble performing trivial oral English exam tasks, like picking some items from the list and saying why he liked or disliked them. The way he sees the world, some things are simply unfathomable, or in any case, extremely complex, too complex to imagine one can sum them up in one sentence or come up with the chain of causes and consequences of liking something on the spot. He often tells me he sees the patterns, the details. Seeing objects or events in such complexity may mean it feels inappropriate, irresponsible, plain wrong to Simon to reduce those objects and events to a short string of characters.

This made me reflect upon how Simon keeps shaking me awake. I used to find nothing wrong with playing the reductionist game and frankly, had I been asked to sum myself up in one sentence, I would have readily come up with something like “a Russian journalist and a home educator”. It’s thanks to Simon that I am waking up to see how inaccurate that is. I begin to see how many games that we play in our society are forcing us to zoom out too far, to generalize too much. How often don’t we just plug something in, pretending we can answer impossible questions about the hugely complicated world around us and inside us! Well, Simon often honestly tells me that he just doesn’t have the answer.

For that first question in the interview, I suggested Simon answer something like “it’s more difficult to sum myself up in one sentence than to prove that e is irrational”, to which he replied: “But Mom, to prove that e is irrational is easy! It’s hard to prove that Pi is irrational!”

I must add that at the same time, Simon has really enjoyed the fact that Repl.it has written a developer spotlight about him as well as the social interaction on Twitter that the piece has initiated. It gave him a tangible sensation of belonging to the programming community, of being accepted and appreciated, and inspired him to work on his new projects in Repl.it.

Coding, JavaScript, Machine Learning, Milestones, Murderous Maths, neural networks, Notes on everyday life, Set the beautiful mind free, Simon teaching, Simon's Own Code, Simon's sketch book

What Simon did instead of taking the SAT on Saturday

On Saturday morning, Simon didn’t go to the SAT examination location, although we had registered him to try taking the SAT (with great difficulties, because he is so young). In the course of the past few weeks, after trying a couple of practice SAT tests on the Khan Academy website, we have discovered that the test doesn’t reveal the depth of Simon’s mathematical talent (the tasks don’t touch the fields he is mostly busy with, like trigonometry, topology or calculus and require that instead, he solves much more primitive problems in a strictly timed fashion, while Simon prefers taking time to explore more complex projects). This is what happens with most standardized tests: Simon does have the knowledge but not the speed (because he hasn’t been training these narrow skills for hours on end as his older peers at school have). Nor does he have the desire to play the game (get that grade, guess the answers he deosn’t know), he doesn’t see the point. What did he do instead on his Saturday? He had a good night sleep (instead of having to show up at the remote SAT location at 8 a.m.) and then he…

built an A.I. applying a genetic algorithm, a neural network controlling cars moving on a highway! The cars use rays to avoid the walls of the highway. Implementing neuroevolution. What better illustration does one need to juxtapose true achievement and what today’s school system often wants us to view as achievemnt – getting a high grade on a test? The former is a beautiful page from Simon’s portfolio, showing what he really genuinely can do, a real life skill, something he is passionately motivated to explore deeper, without seeking a reward, his altruist contribution to the world, if you will. The latter says no more than how well one has been trained to apply certain strategies, in a competitive setting.

Simon’s code is online: https://repl.it/@simontiger/Raytracing-AI

Simon has put this version on GitHub: https://github.com/simon-tiger/Raycasting-A.I.

He has also created an improved version with an improved fitness function. “In the improved version, there’s a feature that only shows the best car (and you can toggle that feature on and off). And most importantly, I am now casting relative to where it’s going (so the linearity is gone, but it jiggles a lot, so I might linear interpolate it)”, – Simon explains. You can play with the improved version here: https://repl.it/@simontiger/Raycasting-AI-Improved

Finally, Simon is currently working on a version that combines all the three versions: the original, the improved and the version with relative directions (work in progress): https://repl.it/@simontiger/Raytracing-AI-Full

“I am eventually going to make a version of this using TensorFlow.js because with the toy library I’m using now it’s surprisingly linear. I’m going to put more hidden layers in the network”.

The raytracing part of the code largely comes from Daniel Shiffman.

Simon’s two other videos about this project, that was fully completed in one day:

Part 1
Part 2


Coding, JavaScript, Lingua franca, live stream, Machine Learning, Milestones, Murderous Maths, neural networks, Notes on everyday life, Python

Magic around New Year’s Eve

This magical time of the year, Simon’s craziest, most daring dreams come true! First, his guru from the New York University Daniel Shiffman sends Simon his book and the words he writes there are the most beautiful words anyone has ever told him. Then, on the last day of the awesome year 2017, Simon’s other hero, the glamorous knight of AI Siraj Raval materialises in our living room, directly from YouTube! Happy New Year full of miracles and discoveries everyone!

DSC_3314

Daniel Shiffman’s book “The Nature of Code” that Simon had already largely read online and now also reads before bed. It also comforted him recently when he was in pain, he cuddled up of the sofa with this big friendly tome on his lap.

dsc_33401897498871.jpg

Daniel Shiffman signed the book for Simon:

dsc_33441647117253.jpg

dsc_33421879896746.jpg

Siraj Raval stepped out of the YouTube screen straight into our Antwerp apartment on December 31. Simon has been following Siraj’s channel for months, learning about the types of neural networks and the math behind machine learning. It is thanks to Siraj’s explanations that Simon has been able to build his first neural nets :

DSC_3370

DSC_3364

Schermafbeelding 2018-01-05 om 02.07.56

Coding, Machine Learning, Milestones, Murderous Maths, neural networks, Python, Simon teaching

The Neural Nets are here!

Simon has started building neural networks in Python! For the moment, he has succeeded in making two working neural nets (a Perceptron and a Feed Forward neural net). He used the sigmoid activation function for both. The code partially derived from Siraj Raval’s “The Math of Intelligence” tutorials.

ML Perceptron 10 Dec 2017

The FF was tougher to build:

Simon’s nets run locally (on our home pc), but he will need more computational power for the more complex future projects, so he signed up to this wonderful online resource called FloydHub! FloydHub is sort of a heroku for deep learning, a Platform-as-a-Service for training and deploying deep learning models in the cloud. It uses Amazon, which Simon could, too, but it would have been a lot more expensive and tedious work to set up.

Simon’s next step will be another supervised learning project, a Recurrent Neural Net that will generate text. He has already started building it and fed it one book to read! In this video he explains how character-based text generators work:

Coding, Milestones, neural networks, Notes on everyday life, Python

DAE neural net and Keras

Simon told me today he was ready to start building his own DAE (Denoising Auto Encoder) neural network. He said he would be using a documentation page about a machine learning library called Keras at blog.keras.io/building-autoencoders-in-keras.html. He found this documentation page completely on his own, by searching the web and digging into Python fora. I just watch him google something like “How can I install Keras 1.0?” and find GitHub discussions on the subject that guide him along. Or I see him type “How to install Python on Windows?” and follow the instructions at How-to-Geek. Eventually, he came up with a list of steps that he needed to complete in order to be able to install Keras (installing Python 3 (looking up why it should be 3 and not 2), installing PIP, installing Tensor Flow, etc). It didn’t work on a mac laptop, so he tried everything on a pc and it worked! Two steps required that he used terminal. It was amazing to see him plan ahead, search and implement (notoriously difficult) steps completely independently.

He has started working on the DAE tonight. Working on a node package that makes `manifest.json` files (for Chrome extensions) at the same time, so not sure he’ll finish soon. “Mom, I’ve got so many things to do! There are so many thoughts in my head!”

DSC_2911

Coding, Milestones, neural networks, Python, Simon teaching

Simon working on a neural networks paper

Simon was working on a neural networks paper in Jupyter Notebook on Friday evening, but didn’t finish it because the Coding Train live stream started. He says he can no longer continue without having to do too much copy-pasting from this version into a new one, as his in-your-browser time expired, so I’m posting some screen shots of the unfinished paper below. This is the way Simon teaches himself: he follows lectures and tutorials online and then goes ahead to writing his own “textbook”or recording his own “lecture”. Much of the knowledge he acquires on neural networks these days comes from Siraj Raval’s YouTube series “The Math of Intelligence”.

 

Neural Networks Paper Jupyter 2017-11-20 1

Neural Networks Paper Jupyter 2017-11-20 2

Neural Networks Paper Jupyter 2017-11-20 3

Neural Networks Paper Jupyter 2017-11-20 4

Coding, neural networks, Simon's Own Code

Simon building a Perceptron in Processing

Simon has already built a Perceptron before, several months ago, while following along with Daniel Sgiffman’s Coding Train channel. This time around, he is writing his own code ad doing all the matrix calculations himself. He hasn’t finished programming this network yet, but it’s a good start:

 

DSC_2874

Doing Matrices in Khan Academy’s Precalculus course:

Schermafbeelding 2017-11-16 om 12.34.36

Coding, Geometry Joys, Milestones, Murderous Maths, neural networks, Notes on everyday life

Just another day in graphs

Simon loves looking at things geometrically. Even when solving word problems, he tends to see them as a graph. And naturally, since he started doing more math related to machine learning, graphs have occupied an even larger portion of his brain! Below are his notes in Microsoft Paint today (from memory):

Slope of Line:

Slope of Line 15 November 2017

Steepness of Curve:

Steepness of Curve 15 November 2017

An awesome calculator Simon discovered online at desmos.com/calculator that allows you to make mobile and static graphs:

Desmos.com Polynomial 15 Nov 2017

Desmos.com Polynomial 15 Nov 2017 1

Yesterday’s notes on the chi function (something he learned through 3Blue1Brown‘s videos on Taylor polynomials):

DSC_2858

Simon following The Math of Intelligence course by Siraj Raval:

DSC_2843

DSC_2840