In the last few months the Internet has been flooded with deep dreams: images augmented by neural networks which look incredibly trippy. Deep dreams have the potential to become the new fractals; beautifully backgrounds everyone knows are related to Maths, but no one knows really how. What are deep dreams, how are they generated and what can they teach us?
Machine Learning
There are 18 posts filed in Machine Learning (this is page 2 of 2).
Evolutionary Computation – Part 4
Our journey to harness the power of evolution is coming to an end. In the previous three parts of this tutorial we have constructed a bipedal body and a mutable genome that determines its behaviour. What’s left now is to actually implement the evolutionary computation that will find a successful walking strategy.
- Part 1. The Evolution Loop
- Part 2. The Simulation
- Part 3. The Fitness Evolution
- Part 4. Improvements
- Conclusion & Downloads
Evolutionary Computation – Part 3
When we are looking at a problem through the lens of evolution, we always have to take into account its two faces: the phenotype and genotype. The previous post focused on creating the body of the creature, together with its brain. It is now time to focus on the genotype, which is the way such information is represented, transmitted and mutated.
Evolutionary Computation – Part 2
In the first part of this tutorial we have explored what evolutionary computation is, and why it works. The rest of this tutorial will show how to set up a practical example and how to use evolution to solve a real problem. In our case, the problem is teaching a bipedal creature how to keep balance and how to walk effectively. Rather than evolving the body of the creature, we are interested in finding a strategy to make it walk as fast as possible.
- Part 1. The Body
- Part 2. The Brain
- Part 3. The Controller
- Part 4. The Fitness Score
- Conclusion
Evolutionary Computation – Part 1
This series of tutorial is about evolutionary computation: what it is, how it works and how to implement it in your projects and games. At the end of this series you’ll be able to harness the power of evolution to find the solution to problems you have no idea how to solve. As a toy example, this tutorial will show how evolutionary computation can be used to teach a simple creature to walk. If you want to try the power of evolutionary computation directly in your browser, try Genetic Algorithm Walkers.
- Introduction
- Part 1.
NaturalArtificial Selection - Part 2. Phenotype and Genotype
- Part 3. Evolutionary Programming
- Part 4. Local Maxima
- Conclusion
Game Barcode: A Study of Colours in Games
This tutorial shows how to download videos from YouTube and to process their frames with Python; I have used this technique to create game barcode, an image created by sorting the colours in each frame of a particular video. You can see some of most intriguing here:
- FEZ (video, 2000px)
- Journey (video, 2000px)
- Super Mario World (video, 2000px)
- Fallout 4 (video, 2000px)
This tutorial is divided in four parts:
- Introduction
- Step 1. Processing a video
- Step 2. Processing a frame
- Step 3. Generating the barcode
- Step 4. Downloading from YouTube
- Conclusion
How to DeepDream on Twitter: @DeepDreamThis
This post will guide you to create your own deepdream on Twitter: and yes, it’s as easy as tweeting a picture to @DeepDreamThis. Deep dreams have flooded the Internet. I mean, literally flooded the Internet. Behind this bizarre filter lies one of the most advanced neural network developed by Google Research. There are several services online dedicated to the creation of deep dreams, but most of them have unreasonable waiting times (hours or days) and lack customisation options.
TL;DR:
The fastest way to generate your deep dreams on Twitter is simply twitting a picture to @DeepDreamThis: in a matter of seconds or minutes it’ll reply to you!
@AlanZucconi #deepdream pic.twitter.com/b8cyLXHP9B
— Deep Dream This (@DeepDreamThis) July 11, 2015
How to find the main colours in an image
In a previous post, I explained how I grabbed all the screenshots from #ScreenshotSaturday. If that was something relatively easy to implement, ordering them by colour is slightly trickier. The problem here is that there is no standard way to find the main colours in an image. Quite the opposite, different techniques will produce very different results. Long story short: this is not really a problem for programmers, and that’s why it may be more interesting to discuss about it.
Colour theory
Let’s say that we already have our screenshot. Now, we want to find its main colours. If you are familiar with Photoshop, a starting point is accessing the histogram which represents the distribution of colours. Peaks in the colour histograms can be associated with the main colours. Conrad Chavez wrote a very detailed post about it, if you are interested in this. The image below shows a level in 0RBITALIS which is predominantly blue and green; this can be seen directly from the colour histogram.