Posts Tagged ‘Flash’

My AI reads your mind and kicks your ass (part 2)

In the last post I discussed how it is possible to program a game Artificial Intelligence to exploit a player’s unconscious biases using a simple mathematical model. In the karate game above, the AI uses that model in order to do the largest amount of damage. Give [...]

Guess 2/3 game: sending data from Flash to a remote database

I wrote a simple game to learn how to store on and retrieve data from a server-side database. The rules are simple: you have to guess 2/3 of the average of the guesses of all the players. So, for example, if you think that the other players guessed on average 100, your guess should be [...]

Simulated evolution

Here’s another classic from the 80′s: an artificial life simulation, where bugs move on a virtual Petri dish, hunting for bacteria. If they manage to survive until adulthood, and accumulate enough energy from bacteria, the bugs reproduce and generate two copies of themselves. In the reproduction process, the genetic code undergoes small mutations, so that [...]

2D Cellular Automata

I decided to get my feet wet with Flash + ActionScript programming with a classic of the 80′s: 2-dimensional Cellular Automata! A 2D CA is a grid of cells, each of which can be in either an “alive” or “dead” state. The state of each cell evolves in time, according to simple update rules based [...]