James Borda Writer, Game and Interaction Designer

Algorithms Week 7 Update

Finally some progress on the programming front.

I’ve put all the basic pieces in place for a spacial agent-based model. The sketch consists of a square grid that spaces itself dynamically depending on the size entered in the parameters of the sketch. Likewise, a user-variable number of agents appear as circles on the grid and interact with it turn-by-turn. (In all versions, there is a blue rectangular space on the right side of the window which will be a user control panel.)

Here is an early version. This was a test to make sure the agents were communicating to the proper grid squares. The agents are colored randomly, and as they move down the grid they change the color of the grid squares.

The next version was a test to ensure that the grid squares were talking back to the agents. Now the agents and squares exchange colors with one another. The agents are also moving (randomly)  in all four directions, and the grid is unbounded; agents can step off one side and appear on the other.

Finally, the latest version introduces speed control (using the millis() function I can adjust a variable that determines how often the system iterates; in this case I set it to 500 milliseconds) and links between agents. Whenever two agents are directly adjacent on the grid, a link is forged between them.

Now that all these building blocks are in place, I can add in the detailed interactions between the agents and the grid environment.

 

Post Details

Posted: March 15, 2012

By:

Comments: 0

Seo