I decided to put the Poisson disk sampling code here for download since the site that hosted it is down. The code accompanies the tutorial on Dev.Mag: Poisson Disk Sampling.
Download
7 April 2010 |

(Original image by Hljod.Huskona / CC BY-SA 2.0).
I used to hate neural nets. Mostly, I realise now, because I struggled to implement them correctly. Texts explaining the working of neural nets focus heavily on the mathematical mechanics, and this is good for theoretical understanding and correct usage. However, this approach is terrible for the poor implementer, neglecting many of the details that concern him or her.
This tutorial is an implementation guide. It is not an explanation of how or why neural nets work, or when they should or should not be used. This tutorial will tell you step by step how to implement a very basic neural network. It comes with a simple example problem, and I include several results that you can compare with those that you find.
Read the rest of this entry »
Tags: AI, artificial intelligence, Matlab, neural network, Octave, optimisation, pattern recognition, random, sampling
It is sometimes necessary to find the distribution given a sample set from that distribution. If we do not know anything about the distribution, we cannot recover it exactly, so here we look at ways of finding a (discrete) approximation.
Read the rest of this entry »
Tags: 2D, convolution, distribution estimation, Python, random, random distribution

A cellular automata system is one of the best demonstrations of emergence. If you do not know what cellular automata (CA) is, then you should go download Conway’s Game of Life immediately:
Conway’s Game of Life
Essentially, CA is a collection of state machines, updated in discrete time intervals. The next state of one of these depends on the current state as well as the states of neighbours. Usually, the state machines correspond to cells in a grid, and the neighbours of a cell are the cells connected to that cell. For a more detailed explanation, see the Wikipedia article.
Even simple update rules can lead to interesting behaviour: patterns that cannot be predicted from the rules except by running them. With suitable rules, CA can simulate many systems:
- Natural phenomena: weather, fire, plant growth, migration patterns, spread of disease.
- Socio-economic phenomena: urbanisation, segregation, construction and property development, traffic, spread of news.
Read the rest of this entry »
Tags: 2D, AI, algorithm, blending, cellular automata, Conway's game of life, Dev.Mag, diffusion, discrete dynamics, disease simulation, fire simulation, force, Game Maker, grids, optimisation, probability, random, sampling, Simulation, social dynamics, sum, tiles
For many applications, detailed statistical models are overkill. Instead, we can get away with a rough description of the distribution – not in mathematical formula form, but just as a graph with a few sample points.
For example, when trying to model the traffic around a school, you might know that the graph looks something like this:

The input is the number of minutes before the first bell rings, and the output the number of children dropped off at that time. You know that most kids are brought before the bell rings, and that the closer to the bell, the more kids are being brought every minute. Only a few kids are late.
This tutorial describes how to generate random numbers that can generate a distribution described by an arbitrary (piece-wise linear) curve, as the one above.
Read the rest of this entry »
Tags: C++, distribution function, Mathematics, probability, Python, random, random number generation, response curve, sampling, Special Numbers Library
Google App Engine has many properties that makes it suitable for indie development. Two articles in Dev.Mag look at GAE for game development (Issue 24 and Issue 25). The first is an overview of Google App Engine, with some focus on games. The second is a tutorial that explains the implementation of “Guess a Number” on Google App Engine, for which you can download the code. For the tutorial you will need:
Read the rest of this entry »
Tags: AI, Dev.Mag, Django, editor, Game Development, Google App Engine, Python, Web Development
Game Maker is a great tool; it is especially suited for rapid development and small projects. However, as a project becomes bigger, it becomes more difficult to find things, easier to break it, and generally harder to work on. This is of course true for any production environment, and there are many things you can do to tame the beast of scale. Here are 60 things to make Game Maker projects more maintainable.
Read the rest of this entry »
Tags: editor, Game Development, Game Maker, good practices, maintainability, random, Simulation, tiles
Recent Comments