Neural network racing cars around a track

During Christmas of 2019 I got curious about machine learning so I put together an experiment. I wanted to see how well ML could drive a car around a racing track. I made a video of the application running and put it on YouTube, and it got quite some attention!

2.5 millions views… Just wow…

I kind of got a job offer or two as a result 😉 and the video also got the attention of Google’s AI guru David Ha who posted about it on LinkedIn! Lots of people had questions about it, how it worked, about the ML algorithm, the sourcecode availability.. and honestly I was a bit overwhelmed and I haven’t really taken the time to answer them.

So what else is up? I started another machine learning project which IMO is a lot cooler… 😉 but as usual, real life intervened with work and obligations, so that’s currently in limbo. If/when something gets done, I’ll post something on the YouTube channel…

The current situation, January 2020

Well I finally got up and running again after some issues with Traefik and SSL certs. I think I’ve figured it out now.

I removed the front blog, instead it redirects directly here to the main blog.

I’ve been looking through the blog. Most of it is horribly outdated, incomplete or broken. And it’s just not a priority to fix any of that right now. And there’s not much more to say about that.


Skrev denna dikten någonstans mellan åren 92 – 95, tror jag..

Buggjävel, buggjävel, var gömmer du dig?
jag letar i såsen men hittar dig ej,
gurun mediterar titt som tätt,
jag som trodde det här var lätt…

Buggjävel, buggjävel, var gömmer du dig?
hur funkar debuggern? Den svarar mig ej…
kanske jag skriver i minnet där jag ej får vara,
kanske ändrade jag något men glömde spara?

Buggjävel, buggjävel, var gömmer du dig?
jag tröttnar på skiten, jag hänger mig…
Men tänk om jag snart lyckas mosa lusen,
då är det ju dumt att abrupt släcka ljusen…

Buggjävel, buggjävel, var gömmer du dig?
Du slukar min kraft, jag förbannar dig!
Att tiden ska gå åt till sådan smörja,
att leta löss, man kan bara sörja…

Buggjävel, buggjävel, var gömmer du dig?
Nu skiter jag i det, jag skiter i dig,
jag skiter i programmet och säljer min maskin,
och köper istället en färgglad gardin.


While cleaning up I found this text I wrote in 2005, about a compression algorithm I was working on… putting it here in the blog instead (for laughs) and removing yet another hardcoded html page from the unfathomable depths of…


“Mission Goal: Creating the Ultimate Compression Algorithm. My priority is compression ratio, ie creating small files. Compression speed is more or less irrelevant. Decompression speed is more important, but less so than compression ratio.

050314: So there I was, re-compressing my MAME roms-collection using ZipMax, to squeeze out a few more saved bytes… My friend Mgt was working on his assignment, creating a Huffman encoder. Fashinating stuff. I read up on the Huffman algorithm on the web, as well as the LZW algorithm, to get a better idea of what we were talking about.

Previously I kind of had the idea that we were near the limits of compression, but I saw many problems with the algorithms and I had some ideas on how to improve them. I lay awake at night thinking up an improvement on the Huffman algorithm.

050315: Some researching on Huffman revealed that my new improved Huffman algorithm already existed. It’s called “Adaptive Huffman”, and it was even a bit smarter than my own “new” algorithm. Darn. Back to the drawing board. Luckily I still have a few ideas on improvements, both on Huffman and LZW.

050315: I had an idea on how to improve the Adaptive Huffman algorithm. Unfortunately, I now found that, again, I was too late:

“For adaptive Huffman coding, Gallager suggests an “aging” scheme, whereby recent occurrences of a character contribute more to its frequency count than do earlier occurrences [Gallager 1978]. This strategy introduces the notion of locality into the adaptive Huffman scheme. Cormack and Horspool describe an algorithm for approximating exponential aging [Cormack and Horspool 1984]. However, the effectiveness of this algorithm has not been established.”

Strange, the effectiveness has not been established? Just code it and try it out! What’s stopping them? It has been 20 years!!! Anyway, my algorithm is simpler and smarter than “approximating exponential aging”. Maybe I’ll implement my algorithm and run a few tests.

A few links:

Adaptive Huffman:

The original LZW paper by Terry Welch:

LZW article by Mark Nelsson in DDJ:

ZIP format (by PKWARE):

050315: I’ll definitely use my own format for the compressed archive. It’s time to get rid of ZIP and old, ugly, inefficient, bloated file formats like that.

050318: I searched the net for some decent tree class, but found nothing.. Nothing, I tell you, nothing! My old jeTree class that I coded a long time ago was not exactly what I needed, so I started coding on a new jeTree class. The base class is now complete and I will sooon finish the jeAdaptiveHuffmanTree class…

I learned that I am not alone in my quest. MGT’s Power Packer 2005 is coming along nicely and could be a serious threat. We shall have to wait and see which will be the Ultimate Compressor…”

The modesty, it burns! Anyway, it’s safe to say that I will never finish that project. Same old story: No time, no money. Gotta prioritize.


I’ve become inspired by the success of the indie-game Minecraft, and naturally I had to give coding a game myself a try. Given the fact that I have very little spare time between work, family and other duties, it could take a while… but life will find a way. The name of the game is Kojvenepane (don’t complain, it was available!) and here’s the development blog:



Well… thought I’d post a status update about my freeware software projects. It’s a curious thing, I never seem to have time to finish them. Development of jeSokobanSolver 3 has been halted due to a memory bug (corruption, of unknown causes, I now think I know why but haven’t gotten around to fixing it yet). Nothing is being done on jeTMS, been doing some work on the new jeDebug but really need to put in a full week of coding to get it up and running. And today I find myself in the rare situation that I have a few spare hours and a burning desire to do some coding, so I will…. start a new project! 🙂 Going to get jeMachineManager up and running FAST.

jeMachineManager (previously jeServerManager) or jeMM for short, is Systems Management software that I spec’ed years ago… It keeps inventory of hardware and software, monitors uptime and health, and notifies the admin of any problems on any of the machines. There are lots of other SM software like System Center Configuration Manager from Microsoft or the open-source Nagios, but they are all bloated and complicated to setup and manage (no offense), requiring a bunch of intrusive pre-requisites, special user accounts and in some cases hogs too much resources.

jeMachineManager is a minimal light-weight solution, requiring only the installation of a small client (service) on the client machines. It communicates via HTTP with a cgi (or webservice) on the server. The cgi talks to a MS SQL database. There’s also an administration web interface and an admin client that handles notifications etc.

The client –> server HTTP communication means there’s very little to configure for the network access, and you’ll be able to add machines that are outside of the intranet, or in an another intranet.

In its most basic mode the client just polls the server with “I’m alive!”-messages, reporting ID and IP. That’s how I’ll be able to get it up and running quickly. All further functionality is provided with an addon-system yet to be designed.

The admin can group machines together in any way he wants, and he has access to the web interface that provides an overview of all the machines and their status, including a list of warnings… machines that are down, services that don’t reply, excessive cpu loads, disks that are near full, software that needs updating, security issues, failing fans etc etc.

The client-client does not need the server though, it can operate in a stand-alone mode where it only notifies, and advices, the user of any computer health concerns.

Starting development… hmm.. NOW!

No I didn’t, the spare time disappeared. Ok maybe thursday.

20200526: This project is permanently canceled.