Showing posts from August, 2018

Teaching a robot how to vacuum clean with genetic algorithms!

Pt En < change language In this post I want to showcase the beginning of what I think will be a really cool project. After reading a really nice book (that Bill Gates himself recommends) on machine learning, I decided to experiment with genetic algorithms. For that matter, the main goal here will be to develop a genetic algorithm that teaches a vacuum cleaner how it should move in a dirty room to clean it in the best way possible (that is what is happening in the animation above). The first step is to define what I mean by room : a room will be a rectangular grid where each cell has a number from $0$ to $1$. A cell with a $0$ is perfectly clean and a cell with a number $1$ is as dirty as a piece of floor can get. Below we see a $5\times 5$ room with a robot (in red) already in the middle of the room: As I read in The Master Algorithm (and frankly I found it very enlightening), when one is going to use genetic algorithms we must previously define the structu

Twitter proof: not too hairy

Pt En In this post I will show that some londoners share more than their native language and their propension to get sunburnt. For that we need to notice that there are more than $8.5$ million londoners and that the average human has $100,000$ hairs in the head. Assertion : there are, at least, $9$ londoners with the exact same number of hairs in their head. Twitter proof : given the facts above, there are more than $8$ million londoners with less than $1$ million hairs in their head. By the pigeonhole principle this means at least $9$ londoners have the exact same number of hairs. Neste post vamos mostrar que alguns londrinos partilham mais do que o inglês como língua materna e a propensão para apanhar escaldões. Para isso é preciso notar que há mais de $8.5$ milhões de londrinos e que o ser humano médio tem $100,000$ cabelos na sua cabeça. Asserção : há pelo menos $9$ londrinos com exatamente o mesmo número de cabelos na cabeça. Prova num tweet : pelos fac