Wednesday 8 June 2011

Developer Journal 94 - On Long Term Populations


The simulation crashes when the population grows and I run out of space for robot view ports. Each view port wastes too much space because of the padding I put between them when I hard coded their positions. I'm tempted to write some code to get these positions from a text file. I could hard code them again but that doesn't feel right. I also need to know what the upper limit is for the number of view ports so that I can do something about the population growth. I also have to enable the automatic periodic saving code.

Getting parameters from text files is a common thing. I don't want to use Boost Serialization and I don't want to take on an unfamiliar library at the moment. There is a Boost library for doing this but I can't make heads or tails of the documentation.

Hmm. Bigger view ports definitely slow things down. It's because of moving the pixels values from the screen to an intermediate data structure and then into the neural network.

The resolution is 1280 x 1024. The view ports are 16 x 16. So that is 80 view ports across and 64 down for a total of 5120. That is more than enough for now.

Now to enable the auto-save. I don't have to enable the auto-load because I can enable the simulation when I leave the office. I used to have to only enable it from midnight to seven am because my computer made too much noise.

RELATED

No comments:

Post a Comment