Don't hard-code data-structures for Artificial Intelligence (AI). Evolve them (and control flow) as cycles of arrays in arrays with size constraints based on other array sizes (at specific index) in terms of range, multiply, exponent, or permutation. No working code yet. Whats there now is an extension of GigaLineCompile which would become part of Human AI Net, but there are other projects to finish before I can come back to this one.
PHPNN Is an open source, GPL licensed, PHP class library for the easy creation and manipulation of Neural Network based artificial intelligence. This library is intended for use in experimentation, games, quality control, or any other purpose.