Q Learning Explained With HTML5

I have a theory that in the future coding job interviews might not only ask questions about basic time-complexity such as Big O, but involve problems in NP and how to approximate solutions in realistic time-frames. Or to put it a little more bluntly, employers will want to know if you have some machine learning knowledge.

This post is about a very simple learning algorithm called Q-Learning, although simple it can be used to effectively tackle problems such as elevator scheduling, and is the underlying idea behind Alpha Go, DeepMind’s Go playing AI. The Tic Tac Toe game below has an opponent trained using Q-Learning, the algorithm should find a good strategy, try it out!

Read More

Old Amiga Projects Dug Up

A few months back I was clearing out my old room in my parents house, while digging though my old stuff I found my old Amiga hard drive. I plugged it in to my PC and booted it with WinUAE, to my surprise everything worked exactly as I left it in the 90s.

Here are some gifs of two BlitzBasic projects I was working on. Since I wasn’t the best student I didn’t have the opportunity to learn about linear algebra at school, so these are written using trig only. Now let’s all be thankful we live in the internet age.

Read More

Project Vector HTML5 Demo Game

Back in 2012 I worked for a company which developed a GPU accelerated mobile WebKit. We needed a quick demo to show off performance so I knocked up this demo quickly. The company no longer exists, but I’m able once again to upload the demo. This was designed to be quite demanding so expect your phone to get hot quickly even though some years have passed since it’s creation, the hardest part is probably the navier stokes solver for fluid particles.

Click “PLAY” and enjoy!

Read More

FizzBuzz in Keras

Recently my lunch hour afforded some time for one of my favourite things, promoting #DerpLearning on Twitter. So I ported Joel Grus FizzBuzz in TensorFlow to Keras.

_config.yml

New front end APIs abstracting much of the setup required for Deep Learning takes away somewhat from Joel’s joke, but I predict democratization will lead to much more advanced #DerpLearning.

This image shows Keras output vs a correct FizzBuzz. In some effort to maintain the geek comedy, there are still some errors but adjusting parameters for a correct output is trivial. Here is the Gist on GitHub.

Read More

Real-Time Physically Based Rendering and BRDFs

_config.yml

The topic of BRDFs can often be confusing, so I’m going to attempt to break down what they are and how they relate to physically based rendering as simply as possible. We will be writing GLSL for real-time PBR rendering as we go along, the above image was rendered using the shader.

For this guide I’ve gathered together information and images from disparate sources including Wikipedia, jMonkeyEngine, Marmoset, UnrealEngine and nVidia. I’ve referenced each source as carefully as I can, but if any of the content owners are unhappy with their usage then I will be happy to replace them right away.

Read More