Fork me on GitHub

Saturday, October 29, 2016

Reinforcement Learning and why you should care.



Amidst all the complexities of life, have you ever stopped to appreciate the simple things? I hope you have, its a refreshing perspective. One thing we definitely under appreciate is learning. How exactly do we learn to read, write, walk, speak. Unlike other animals, our brains are not completely wired up at birth. We are not given any manuals, let alone the ability to understand manuals at birth, yet in less than a decade we fully master these tasks. There is only one valid explanation, reinforcement learning.







Reinforcement learning(RL) is a way of learning without a teacher, in other words learning by doing. Its a proactive way of learning where you perform actions first and subsequent rewards shape future actions. So, when you are learning to walk, if you move the wrong way, you fall (negative feedback) making you less likely to make the same move again. On the other hand, when you make a winning move, reward centers of the brain are activated with Dopamine (positive feedback), making you more likely to repeat the same move. Repeating these actions and making mistakes over time is what makes you better.


In an effort to make computers intelligent, reinforcement learning has also found its way into Machine Learning. It is especially useful where there is no data to train models. If only we could explain how we walk or solve problems, we could easily train robots to do the same, but we don't, so Reinforcement Learning is used instead. It has been successful so far, it has managed to train robots on complex manipulation tasks, train computers to beat humans at Go and play ATARI games among many other tasks. It surely is an important Machine Learning technique.

Although it is high performing, reinforcement learning in computers isn't as simple as it happens in the brain. A lot of conscious effort has to be made to determine the appropriate states, the actions and rewards for those actions. How many dimensions (factors) are required to represent a state? too few and it doesn't capture the problem, too many it becomes intractable. Current research is working to solving this problem.

Albeit its complexity, its interesting and somehow alarming to know that computers can be trained in the same way humans are to be even better than humans. So, perhaps they will one day have a conscious, pass the Turing test and change the course of civilization. Either way, we should expect much more Intelligence in the near future.


In case you are wondering, I'm currently reading The Brain by David Eagleman. It's explains fascinating facts about the brain. I highly recommend it. Have a great week ahead!

Saturday, October 22, 2016

What you probably missed out on ..#PyConZA



Here is a very delayed post on PyconZA which took place on 6th to 7th October. I wish I wrote this sooner but between dealing with somewhat-of-a-personal-crisis, UCT protests and my final year project, blogging got the back seat for a while. That being  said, here we go. I got the opportunity to attend PyConZA, thanks to the conference organizers I got a sponsored ticket. PyconZA conference for python enthusiasts in South Africa to learn from each other. It has been taking place in Johannesburg , luckily it happened in CapeTown this year. The venue was the River Club, which as you can tell from the pictures was a great venue.


the river view


The talks were not only interesting but some were mind blowing. One of my previous lecturers gave a 5 minute introduction on radio astronomy. I learned about about using python for Micro controllers,  for story telling, for serving underprivileged communities , juggling tasks , Machine Learning among many other applications. I know Python is very versatile, but its a lot more fascinating when you actually see the applications. I also enjoyed the panel of teaching python for many reasons: first, the question of increasing accessibility to women was thoroughly discussed, second, one of my lecturers was also on a panelist and gave interesting points on Computer Science Education, something I have taken interest in lately or yeah and I also volunteered to monitor the mic. My CV is getting beefed with such volunteer experiences ..:).


A mobile retail app by the startup Timbuktu

Micropython for microcontrollers

Python for creative writing
 Thanks to amazing sponsors, we got lots of goodies especially Takealot vouchers.



Bags of Swag!!



Conferences are more about the people, it has never been truer. I got to connect with fellow East Africans, most of whom were giving talks. This got me all the more inspired to start start speaking at conferences. I also reconnected with colleagues at j5 International where I interned last summer, fellow students and alumni.

j5 founder

I had such a fantastic time at Pycon, I highly recommend it to anyone, even if Python is not your first language. I learnt a lot more about programming in general and open source. If you missed it, videos are now online. Till next time!

PS; You might also be interested in Pycon Namibia and Pycon Zimbabwe happening soon!