As a first finger exercise on the way to a virtual society, I have programmed a cartoon character. It can just look at the cursor and follow it.

Its colouration and gender can be varied. These properties only serve to distinguish the individuals.

The next step for the characters is to learn not to collide with each other.

When two of them meet, they check if their future positions - shown by cycles - will be overlapping or not. If this is the case, they will figure out if it is better to turn to the right or to the left. There are two types of evasion to be selected, either a symmetric one, where both partners avoid each other in the same way, or an asymmetric one, where one character is making the other go first.

Before the start, the red velocity vector may be set by clicking on the red circle at the end of the red line and dragging it into the right position.

Just play a little around with this demonstration.

Now we put some cartoon characters on the field, and make them try to avoid each other. If there are several others at the same time to get out of the way, it may become tight.

Here you also have the choice between the two types of evasion.

In this simulation, you can create some cartoon characters by clicking on the corresponding icons. In this way, you can bring members of the different groups into the game or remove them by clicking on the characters themselves.

They are walking around trying not to collide with each other. They belong to two different groups with different behaviours, symbolized by a different colouration.

In one group, the men have the priority. When a man meets a woman, he just keeps on walking ahead, meanwhile the woman is trying to get out of his way. When a man meets another man, however, or a woman another woman, they go around each other symmetrically.

In the other group, it is the other way round, a man making the women go first, seeking to get out of her way.

Just watch how they get along with each other!

In this game, all characters initially behave as in "Many Characters". However, they can now let their view wander. The angle of both eyes is shown with two black lines. If the eyes of someone meet another indiviual, he will change his behavior : He starts to follow the other. His view is now marked in blue. This phase lasts for one second.

The following phase is highlighted in yellow : The character walks straight ahead without caring about anybody else. This also takes one second. Then, the same procedure starts all over again, with the man making roam his eyes, walking straight ahead. Of course, the chance is high that he now again catches sight of the guy in front of him and begins to follow him once more.

With the help of the sliders, different parameters can be modified, namely
- the strength of repulsion when two bodies are threatening to overlap,
- the duration of the "yellow" phase without any interaction,
- the viewing distance and
- the viewing angle.

The graphical display of the views can just as well be switched off. .

The remarkable thing about this simulation is that there are some "social" effects which I myself, having written the program myself, have not anticipated. This is a genuine case of emergence. The continuous loop of always the same sequence of "seeking - following - doing nothing" leads to the surprising formation of a "single file". It may even come to a ring closure, so that the row becomes extremly stable.

Please note another detail during the formation of this "polonaise" : When two men are following the same guy in front of them, one beside the other, one of them will start to push the other gradually back. At a certain moment, having dropped back to a certain extend, the view of the slower one will catch his neighbour instead of the man in front and he will accept to follow him instead of the other. This mechanism, favourising the formation of a row, was not intended by me, but arises "naturally" from the continous repetition of the same sequence of "black", "blue" and "yellow" behaviour.

Again, the starting situation is as in "Many Characers". When a person percieves another, this event triggers in him a reaction. The possible reactions can be set at the switchboard :

At the top, a character with green hair is shown. If you click now on the first checkbox with the green text, you can set the reaction of the green man at seeing another green man. The second checkbox is for setting the reaction when catching sight of a blue man and the third for a red one. Now, at the bottom, you'll find a slider for selectig a text. The default text is "continue as usual". Other options are "follow the other", "run faster" or "turn around".

Enjoy the game.

This game goes back to a story I've heard at school, not knowing the author :

One morning, a man walks across a bridge. A gust of wind blows him his hat off into the Spree river. He looks after it for a while, then resigns to the loss and moves on. In the afternoon, he comes back again to the same place and notices a group of people all staring onto the river. He finally notes that he himself is the cause of this crowd: When he had looked after his hat in the morning, some curious people had joint him in order to find out what he was looking at. When he had left the place, the others continued to look, attracting again some other people, and so on. In this way, there was a steady amount of onlookers continuing to mantain a crowd over the whole day.

The third character appearing on the bridge, the one with the red hair, is the man with the hat. The aim of the game is to bring about the formation and propagation of such a steady crowd. The sequence of behaviours is :

- let your eyes wander (black),
- when you see someboy else, follow his view (red),
- if the other's viewing direction differs strongly from his moving direction, continue to look into this direction (light blue),
- go on after some time; let your eyes wander (black).

Parameters to be set with the sliders are the density of pedestrians and the duration of the light-blue phase (curiosity). The viewing direction can either be displayed or not.

Have fun with it !