Wednesday, September 16, 2015

Another GoodAI Milestone: Attention, Vision, and Drawing

Today I am excited to share with you that our GoodAI team has reached another milestone. These research results are part of our artificial brain architecture that we call the attention module.

Your brain’s ability to focus and pay attention to its surroundings is an important part of what allows humans to survive and live comfortably. Attention enables you to selectively focus on parts of your environment. We use attention to designate how much concentration a piece of information or particular stimuli deserves, while at the same time ignoring input that we are aware of but know isn’t immediately relevant. Imagine how difficult it would be if walking down the street, we focused equally on everything we saw, heard, smelled, or could feel. Attention helps us know what’s important at any given time. In the past, attention helped us hide from dangerous predators like wolves or bears, and today it enables us to drive cars and even distinguish between a friend’s cute puppy and the neighbor’s unfriendly watchdog.

It’s important to remember that these results are just a subsection of the attention module of our artificial brain, and that we are building on findings of other researchers in the areas of recurrent networks and deep learning. While this is certainly not an extraordinary breakthrough in AI research, reaching this milestone means that we’re on track in our progress towards general artificial intelligence.

Attention Method and Results

The new milestone is that our attention module is able to understand what the things it sees look like, and how these things it sees relate to each other. One subpart of our module shows how it is able to study a simple black-and-white drawing and remember it. It then reproduces a similar but completely original drawing after seeing just a small selection of the drawing.

For example, if you train the module on faces like these:

Subset of images for training faces

And then show it just some hair (which the AI has never seen before):

Partial input
The module is able to generate a new, complete image of its own creative design. The generated image is not a copy, but is an original picture created by the AI, inspired by images it saw previously.

Generated image
You can see the whole process in this video with several examples:

And we went even further in our experimentation. Inspired by DecoBrush, we trained our module to remember ornamental letters. When we draw a normal, handwritten letter, the module adds ornamentation to it. Please note that this is just the first try and several additional improvements, including structure or neighborhood constraints (i.e. convolutions), could be applied to improve the result.
Adding ornamentation to characters. Several characters are perfect (when the module learned what to copy), while others make sense and are novel, i.e. "E" in the fourth row (where the module learn how to combine)

We’d also like to share our work in progress on more complicated dataset. The module was fed with pictures of mountains. Below you can see both inputs (top) and generated images (bottom):

The figure shows picture reconstruction for 12 examples (divided by a line). The top rows show the input. Below the input there are generated images (the network learns how to reconstruct the input image over a series of steps)

The module tries to generalize among the pictures – interestingly, it also added extra mountaineers in the top left picture pair. We are already working on further improvements and even more interesting tests and applications.

A scene for testing attention
Finally, the module can also understand the relationship between objects in a picture. This is illustrated in our next example: a room with objects. The goal here is to teach the attention module to remember the relationship between objects in the room and also remember how the individual objects look. Simply put, we want our algorithm to realize that there are chairs, a plant, that the plant is below the chair, and that the chairs are next to each other.

This video describes the attention module in action and shows the results:

Module details (for advanced technical readers)

For this milestone, we were inspired mainly by two works: Shape Boltzmann Machines that use pixel-neighbor information to complete missing parts of a picture, and DeepMind's DRAW paper that introduces a general recurrent architecture for unsupervised attention. Similar to that system, our model contains two Long Short-Term Memory (LSTM) layers (encoder and decoder) with about 60 cells each (so that it won’t overfit data but tries to generalize across it).

Input images are separated into: (i) a training set that is used for training (such as the images of faces), and (ii) a test set containing images the module didn’t see during the training (for example, just the hair).

To generate a face, the algorithm uses a database of images to learn the characteristics of a face. When the module sees a new image or part of a new image, it generates yet another new image. This newly generated image is then fed as the input in the next time step. Over time, the module improves by generating novel images that make sense to a viewer.

The attention architecture has similar structure to the algorithm for generating images, but differs in the following way: the input is always just one part of the image that it sees (in contrast to full image as before). From that limited input, the attention module generates: (i) the direction where it should look next and (ii) what will be there. This output is fed back as new input in the following step. The model learns to minimize the difference between the overall scene and what it predicted about the scene.
The attention module depends on the ability to learn sequences of information. Here, we give a bit of insight into how we compared two training algorithms using a simple yet challenging example. We tested the Long Short-Term Memory (LSTM) model with Real-Time Recurrent Learning (RTRL) versus Backpropagation Through Time (BPTT). At time 1, we feed the LSTM a randomly cropped part of the picture of a handwritten digit from the MNIST database; at time 2, a random part of the following number is used as the input; and at time 3, it finally sees what it should predict (the number that follows after those two). Recurrent connections are highlighted in blue. While we found that RTRL is great in most cases, it was outperformed by BPTT in this example as unfolding the network seems to be very important here.


This milestone is an important step along the way to developing a truly general artificial intelligence. However, this is still just a small part of the attention module of our artificial brain, and is an even smaller part of building an artificial brain as a whole. Moreover, we are already exploring several improvements of the attention module and you can expect to see these results in an upcoming Brain Simulator update.

In the meantime, we are working hard on other modules of our AI brain - including motor commands, long term memory, and architectures inspired by neuroscience and deep learning, and you can look forward to new milestone news in the near future.

Thanks for reading! And for a special goodbye, here’s how our attention module imagines the Space Engineers astronaut:

And many thanks to Martin, Simon, and Honza, our attention module researchers!

Marek Rosa
CEO, CTO and founder at GoodAI

Note on blog comments:

Lately I’ve received a lot of spam comments on my blog, and unfortunately the blog has no settings for preventing spammers. Due to the extreme amount of spam messages, I am forced to start moderating comments – I hope readers will understand this need, and we will do our best to approve comments as fast as possible.


Want to know as soon as GoodAI reaches another milestone? Check us out on social media:

Tuesday, August 18, 2015

Stabilization period for Medieval Engineers and Space Engineers

Our Space Engineers and Medieval Engineers teams have been working hard to develop new features over the past few months, and recently it became clear that in order to keep the gameplay at a high level, we need to slow down the pace of adding new features and focus more on improvements.  To say it another way, we’ve been pushing towards new features in a highly motivated, almost crazy way and it’s time for a stabilization period :-) We added new features, and now we are working on improving these features and making them feel more complete by using opinions of the community. This is essential for titles that are available in Early Access – we enjoy getting feedback from the community that helps us in the process of optimizing the game.

This means that starting this week, we are moving into a temporary feature freeze period. We will be focusing exclusively on finishing existing features and on bug fixing. I want to assure you that weekly updates will continue, but they’ll be focused on stabilization rather than on new features.

The stabilization period will allow us to fix issues that appeared after recent features were implemented, and improve the overall gameplay.

It’s important to state that going into a stabilization period does not mean that we’ve reached Beta – in fact, we did something similar back in October 2014 (see Taking time to finish existing features and fix bugs is a normal part of game development, and it has been received positively by the community in the past.

The stabilization period will not affect or slow down the development of upcoming major features, which we will continue to work on in parallel with bug fixes. This includes:
  • New multiplayer for Space Engineers and Medieval Engineers
  • Planets for Space Engineers (See our teaser video and screenshots below!)

Finally, I want to say that we are so thankful to our community of players and fans who are very helpful in finding bugs and reporting in-game issues – we couldn’t do it without you.

Thanks very much for reading! As always, feel free to leave comments and questions below. I am very interested in hearing your suggestions, especially about what should get finished and fixed first, what can wait for later, etc.


For further updates, keep reading my blog: or find me on Twitter: @marek_rosa

Or  follow Space Engineers and Medieval Engineers on Facebook and Twitter:
Medieval Engineers on Facebook:
Medieval Engineers on Twitter:
Space Engineers on Facebook:
Space Engineers on Twitter:

Tuesday, July 21, 2015

GoodAI is heading to the AGI-15 conference in Berlin!

GoodAI is gearing up for our first whole-team conference about general artificial intelligence in Berlin, Germany from July 22-25. We’re sending a full bus of team members, about 25 people, to represent GoodAI.

GoodAI team on the roof of our offices!

AGI-15 is organized by the Artificial General Intelligence Society together with the Association for the Advancement of Artificial Intelligence (AAAI). The conference is a yearly gathering of top researchers, academics, and business leaders dedicated to creating general AI.

When I say general artificial intelligence, I’m referring to a technology that’s very different from typical AI applications that most people have heard about – self-driving cars, chess-playing AI, or facial recognition software. These specific applications are commonly referred to as narrow AI, which means that they are built to solve very specific problems.

General AI developers such as GoodAI, however, aim for something more universal. General artificial intelligence of the future will be able not only to perform specific tasks very well, but to function with the skill and ability of a human being. Future general AI brains will perceive stimuli in the same way that a human does – by seeing, feeling, interacting, and learning – and use this data to generate behavior, perform tasks, and respond to motivations given by human mentors. General AI will be as flexible and able to learn as a human.

Conference attendees at AGI-15 will therefore all be dedicated to this major task – developing general artificial intelligence. To support efforts from others outside our company who are aligned with our vision, I decided to officially sponsor the AGI-15 conference with a $10,000 donation.

GoodAI will also deliver a tutorial presentation at AGI-15 about our first product: Brain Simulator, our visual editor for designing artificial brain architecture that is now available to the public under and open source, non-commercial license. The tutorial title is “GoodAI Brain Simulator: Prototyping AI Architectures,” and will offer an in-depth explanation of Brain Simulator and its uses.

Thanks for reading!

If you want to hear more about what GoodAI is doing at the conference or in general, be sure to follow us on social media or check out our website:
Twitter: @GoodAIdev