# tomrochette.com

## What's up with my life

14 Dec 2017

#### AI/AGI/ML - A short overview

After having spent about 200 workdays of my life getting familiar with the fields of AI/AGI/ML, I think it is a good moment for me to reflect back on my learning experience.

# Artificial General Intelligence

Of the three domains, AGI is the least well defined. It has to do with general intelligence, but our definition of intelligence is still up for debate. Furthermore, the different known approaches in the field have different opinions regarding what sort of agent an AGI system should be. Should it be a self-contained entity with its own goals and purpose? Or should it be a system that is exhibiting human capabilities while being the servant of a human being or a group of human beings?

# Artificial Intelligence

Next is AI, which encompasses many different types of approach to try and solve high level goals such as deciding, planning, organizing,, understanding, etc. AI is about the discovery of strategies to solve problems without having to provide the whole solution. I think it is also where goals for the ML field have been defined.

# Machine Learning

Finally, ML is about using statistical approaches to solve problems. These problems have to be formalized and specify their input/output in the shape of data, may it be as text, audio, video, or simply vectors of numbers. Most of the recent and exciting development that has happened in ML is due to deep learning, which is the ability to develop deep neural networks that can learn to accomplish certain tasks without writing any explicit logic. This logic would be discovered by the network itself, with some help of the developer which would define a composition of modules that would process the data in order to create associations between the input and outputs.

# Why AGI?

When I initially started my "adventure", I was interested in AGI. I wanted to know how a machine would be able to exhibit human behavior without having to tell it too much about it. I wanted to learn how you could teach a machine as you would teach a child. The AGI field itself does not currently have any curriculum as to what you should learn about, nor a reference book you can refer yourself or others to (when asked "What should I first read if I want to learn AGI?"). One can be interested in anthropomorphic aspects such as memory, intelligence, perception/senses, processing and so on, while others may be more interested about a computational oriented approach, such as the algorithms, the implementations, the computational complexity of diverse approaches and so on. I think it makes AGI a very interesting topic/field, however it lacks the definiteness of the other fields. One can see this by reading the various iterations of the book "Artificial General Intelligence", which is a collection of articles by various researchers that is generally published every year in relation to its conference.

When I started learning about AGI, I decided I would explore various venues and determine the approaches that matched the most my own interests and which looked the most promising. I looked at different venues such as cognitive science, set theory, logic, universal artificial intelligence, biology, and philosophy amongst others.

Along the road, AGI research has challenged many of my beliefs as well as how I see life. For those two reasons alone, I'm grateful I have been able to dedicate some of my time on it.

07 Dec 2017

#### Blog articles vs articles

One thing I've been wondering about lately is when should one write blog articles (short articles ranging from 250 to 1000 words) or articles (1000+ words) which would be updated (in)frequently but not be as easily consumable.

The main reason I've preferred articles over blog articles is that it makes it possible to keep articles "alive", while once a blog article has been published, it will not evolve over time. By the time it is posted, it is effectively dead and has very little reason to change.

Being a programmer, I've always enjoyed seeing software project evolve over the years. They start small and grow big and complex over time. I like the satisfaction of seeing something grow step by step, and because of that, I've liked the idea of writing about specific topics and seeing these topics and articles change over time.

The problem with articles however is that it is difficult for visitors to consume. Some articles might grow large and complex. Furthermore, it is difficult for visitors to notice any changes from the last time they've come onto the blog.

Another thing is that articles allow the author to "refactor" what he has written, or rewrite/rephrase/reword, such that the article itself improves over time. With a blog article, it is still possible to do so, but the expectation is that a visitor that has already seen the blog article will not re-read it. And here's the important difference between the two: I expect blog articles to be consumed once, but articles to be consumed multiple times. This expectation is likely wrong. The only person that is likely to consume the same article over and over is its author. Visitors may come to the blog many times, but they are unlikely to expect articles to change over time. An extreme example of this idea would be Wikipedia. People will consult the page of the topic they are interested in, but once they've read it, they aren't likely to come back to it again. The only reason they might do so is if they contribute to it.

What this means is that it is still acceptable to improve both blog articles and articles. The difference lies in how we expect our audience to consume each ones. Articles are likely to be seen as references while blog posts are likely to be perceived as an ephemeral observation. One should expect both to be consumed at best once by a visitor, and that the visitor will not come again to see if it has changed.

Thus, in the end, what matters is what we want to communicate with our audience. Do I want to tell you about a thought (a blog article) or do I want to tell you about some information that is likely to evolve over time (an article).

In the case of my machine learning and artificial general intelligence research, what makes sense is to communicate discoveries or shifts in approaches through blog articles while using articles as a location for thoughts to be worked on.

12 Nov 2015

#### My AGI journey

Over the next year (and hopefully years), I plan on working on AI, but more particularly what is known as AGI, Artificial General Intelligence.

Since I am the kind of person that enjoys to overly plan, I've been thinking about the whole process for a while. Here's a brief overview of how I plan to construct my days as well as my work.

# Daily

## Beginning of the day

• Decide and plan on which projects I will work today
• Video log
• What will I be doing today?
• What might be blocking me or will be difficult and how do I plan to tackle that?

## During the day

• Record my thoughts: Either through video logs or through written notes, which is the more likely option. This will allow me to search my thoughts as well as organize them as necessary. Furthermore, I hope I'll be able to optimize my thought flow through tools.

## End of the day

• Video log
• What have I done during the day?
• What are the key takeaway of the day?
• What didn't I do?

• Take notes (of interesting sections and ideas)
• Write down thoughts
• Write down questions related to what is being read (for further exploration)
• Explore right away a question I might have had

# After each mini project

I plan on working on multiple mini projects in order to ensure diversity as well as to allow me to spot projects which have the potential to be interesting and rewarding. However all projects are valuable in their own and it is important to reflect on the project at the end in order to extract things we'll want to repeat in the future as well as things we'll want to avoid.

• Post mortem
• What went wrong
• What went right

# At the end of each month

• Update the status of all tracked activities
• Write a list of things that were done during the month regarding each activity that was done. The purpose is to review what was done as well as provide a way to determine how well a project may/may not be progressing. It is also a good time for me to look at each individual activity that was done during the month and evaluate if I want to keep doing it or not.
• Write a post-mortem of the month, describing the good/bad of my current process and progress, with a section suggesting improvements to try for the next few months.
• Plan the projects/activities I will be working on next month, as well as their time allocation.

# Living process

I will be experimenting with this process in the next few weeks and will iterate on it as I see fit. I will thus be updating this post as changes occurs and I think of better ways to do my work.

06 Nov 2015

# Overview

In this article, we'll go over how to setup Jenkins on an Ubuntu machine to run PHP 7.1 jobs. The steps should easily be adapted for any other OS and target environment.

# Install Jenkins

## Install Jenkins plugins

• Docker Slaves Plugin

# Create a Docker image

• In a Dockerfile
FROM ubuntu:xenial

COPY sources.list /etc/apt/sources.list
COPY known_hosts /home/jenkins/.ssh/known_hosts
RUN chown jenkins:jenkins -R /home/jenkins/.ssh

RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y git vim curl wget build-essential python-software-properties software-properties-common unzip

RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y --force-yes php7.1 php7.1-xml php7.1-mbstring php7.1-zip php7.1-pdo-mysql php7.1-pdo-sqlite

RUN apt-get -y autoremove && apt-get clean && apt-get autoclean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
• docker build -t your/image:1.0.0 -t your/image:latest .

## Specify the Docker image to use

• your/image (will use your/image:latest)

## Use SSH keys within Docker

This is particularly useful if you need to pull git repositories from a private repository.

### Notes

As of December 2016, if you want to be able to use the SSH key in a docker container, you have to first start the ssh agent on the node used that will run the docker container and when you run the docker image, pass in the SSH_AUTH_SOCK as a volume so that it is shared with its host.

sshagent(['IDENTIFIER']) {
docker.image('your/jenkins-slave-image').inside('--volume $SSH_AUTH_SOCK:$SSH_AUTH_SOCK') {
// Here your SSH_AUTH_SOCK is shared with the host machine, which may be a jenkins slave
// All commands that would use SSH for authentication (such as git or composer when installing from private repositories) should work
}
}

# Example Pipeline

node('docker') {
catchError {
timestamps {
wrap([$class: 'AnsiColorBuildWrapper']) { sshagent(['private-git']) { docker.image('tomzx/jenkins-slave').inside('--volume$SSH_AUTH_SOCK:$SSH_AUTH_SOCK') { stage 'Checkout' checkout scm stage 'Setup dependencies' sh 'wget -nc https://getcomposer.org/composer.phar' sh 'php composer.phar install' stage 'Test' sh 'vendor/bin/phpunit' } } } } } } # References 06 Nov 2015 #### Fitness trackers ## Context I've recently become interested in the Quantified Self and wanted to compare a few trackers in order to determine the quality of their solution. In this study, I compare the Fitbit Charge HR, the Jawbone UP3 and the RS300X. The Fitbit and the Jawbone are known as activity/fitness trackers while the RS300X is an heart rate tracker. ## Learned in this study ## Things to explore # Overview Fitbit and Jawbone are known fitness brand trackers. It's been a couple of years now that these types of trackers are popular, so I'd expect them to have come to some level of maturity. The goal of this study is to evaluate the quality of the products, as much in term of hardware as software. In my case, I will be testing the Android applications since I own a Nexus 5. I would expect the experience to be quite similar on iOS. I've also bought an RS300X in order to test a live heart rate tracker. # Fitbit Charge HR ## Pros • Has a little OLED display. • UI/UX is pretty straightforward. ## Cons • The bracelet broke about 3 months after I purchased it. Fitbit support was excellent though and I received a replacement bracelet within 2 days. • Website errored out when I tried to create an application (preventing people from creating apps?) • Cannot get fine grained data. • Heart rate day availability is very odd. Seems to lag out and may display only in chunks. • Shows up in my android smart lock as a bluetooth device I could pair with, but I can't select it. # Jawbone UP3 ## Pros • None at the moment. ## Cons • The bracelet broke about 4 months after I purchased it. • Cannot get fine grained data. • Doesn't do real time heart rate tracking. • Heart rate day availability is very odd. Seems to lag out and may display only in chunks. • No idea why they decided to go with some weird buckle design. It looks like it's a nice point of failure. • After about a month it feels like the buckle is becoming loose. It is more and more frequent that it becomes undone and comes close to falling and I have to attach it back... • After about two months the buckle is becoming loose very frequently. I'd say I have to "re-buckle" it at least 10-20 times per day. That is ignoring the fact that it'll unbuckle while I sleep, making it pretty useless to sleep heart rate while sleeping. • The four heart rate sensors on the lower part of the bracelet are uncomfortable. • All the people I've shown the device to asked "why is there no display, show at least the time...". • Terribly clunky UI/UX. Why can't I just swipe from day to day in any of the stats • For that matter, why is it so hard to display the metrics I'm interested in and get rid of all those "pretty" suggestions cards? • Why would you put unit selection (metric or imperial) as being configured through my height or weight? Is it to save me time or to confuse me? # Fitbit Charge HR vs Jawbone UP3 ## Heart rate The following chart is the data I've collected over 3 days. In black is the Jawbone UP3 data and in blue the Fitbit Charge HR data. Overall, the Fitbit Charge HR data is more consistent (every 5 minutes) while the Jawbone UP3 may end up having no data point for up to 2 hours. I assume this might be caused by how I've been wearing the bracelet but that is a weak argument. ## Pedometer Accuracy between the two devices can vary a lot. [Pedometer chart for comparison] ## Sleep monitoring Both devices seem to measure approximately the same amount of sleep. However the Jawbone UP3 has a nicer chart that goes into the various stages of sleep while the Fitbit Charge HR only displays Asleep/Restless/Awake. [Sleep monitoring chart for comparison] # Polar RS300X ## Pros • None at the moment. ## Cons • Cannot get data out of device (for free). • "If you want your data, pay us another 70\$ +taxes for a transmission device".
• "Oh, and by the way, you're going to send us those precious data over our web service so we can mine it for \\$".
• Watch freaks out if too close from chest strap.
• Who thought of this terrible buckle design? If I want to break the strap, that's how I'd design the buckle.