2D Environment Generator
A while back, I decided that it would be nice to have a systematic and random means of generating two-dimensional environments contained within a bounding rectangle. I envision it as a means of testing the robustness of an individual / program / robot to environmental changes. (i.e. design / evolve your individual in some set environment, then see how it does in a randomly generated environment).
To that end, I created the program below, which returns two-dimensional integer arrays that do the trick. The environments:
- are continuous: i.e. any point of empty space can be connected to any other with a path of width at least three points.
- contain a specified starting point.
- have a notion of environment complexity (i.e. dot complexity) - we showed that this was correlated to the difficulty of generating a CA to solve a toy problem in the generated envs.
- have a (statistically) controllable area
- span a robust space: any environment can theoretically be created, up to the above constraints.
To see more details, including statistical claims and pseudo-code, consult my and Wolfgang's paper: Augmenting Artificial Development with Local Fitness.
The code is available as a NetBeans project: NetBeans Environments2D package (zipped). Non-NetBeans users can just extract the source files from the directory "src/", and the javadocs from "dist/". See the Main class for example usage. Feel free to modify and use the package for non-commercial purposes, but please do reference the above paper.