The Game of Life

A few days ago I was getting bored and decided to to something fun. Yes, you can get bored at TUDelft… Well, actually you don’t get bored, you get sick of all the work you have to do (apologies to anyone offended by this). So in a quest of something fun but still productive I found Conway’s Game of Life.

Game Of Life

The Game of Life is not really a game because no one plays it. It is a cellular automaton, a zero player game in which the only human interaction is the initial setup. Then the game evolves by itself under the constraint of some rules, until it gets to a stable state.

The game’s world is a 2D grid in which each node is a place that can hold one individual. Each individual can be dead or alive. Basically you can see the world as a black, white grid in which black represents living individuals and white dead ones (the figure on right).

Each grid represents a single generation. In order to get a new generation the current one must evolve. This process implies that every individual (dead or alive) node will be evaluated and, based on the result, will survive, die or resurrect. The evaluation function takes in consideration the number of alive neighbors a node has (a node can have up to 8 neighbors):

  1. If one individual has less than two neighbors alive, it will be dead in the next generation because of underpopulation.
  2. If one individual has more than three neighbors alive, it will be dead in the next generation because of overcrowding.
  3. If one individual is alive and has two or three neighbors alive, it will survive in the next generation.
  4. If one individual is dead and has three neighbors alive, it will resurrect (be alive) in the next generation.

That’s all. Based on this transition, each individual gets from one state to another, from generation to generation. There are two situations in which no more changes will be made between generations:

  1. All individuals are dead.
  2. All individuals are in a stable state from which they cannot die. The square on right is a stable population that cannot change because all alive individuals have two or three neighbors and all dead individuals have at most two neighbors alive so they cannot resurrect.

The fun part was to implement this myself. I created a small MFC application that is able to load files with predefined configuration or to generate random populations up to 10.000 individuals. If you download the sample be aware it will crash if you load invalid files and do strange things – it is just a prototype.

Read the rest of this entry »

GeekMeet Brasov 5 Presentation

I spoke about rule based systems at GeekMeet Brasov 5. My presentation, in Romanian, can be downloaded from the link below:

Download IconDownload the presentation

The video recording of my speech can be see below:

Read the rest of this entry »

My Thesis is Available for Download

I want to share with everyone my Bachelor’s thesis.

It is called “Sisteme bazate pe reguli, o implementare moderna. Algoritmul Rete” (eng. “Rule based systems, a modern implementation. Rete algorithm”) and it is written in Romanian.

Feel free to download it from its page and *please* provide feedback.

Machine Learning (Stanford) 2

Lecture Description:

Lecture by Professor Andrew Ng for Machine Learning (CS 229) in the Stanford Computer Science department. Professor Ng lectures on linear regression, gradient descent, and normal equations and discusses how they relate to machine learning.

Read the rest of this entry »

Machine Learning (Stanford) 1

First part from an interesting Machine Learning course from Stanford University.

Lecture Description:

Lecture by Professor Andrew Ng for Machine Learning (CS 229) in the Stanford Computer Science department. Professor Ng provides an overview of the course in this introductory meeting.

This course provides a broad introduction to machine learning and statistical pattern recognition. Topics include supervised learning, unsupervised learning, learning theory, reinforcement learning and adaptive control. Recent applications of machine learning, such as to robotic control, data mining, autonomous navigation, bioinformatics, speech recognition, and text and web data processing are also discussed.

Read the rest of this entry »