For the NetLogo simulation, the Scala extension for cartesian genetic programming has built. In this extension, it creates and manages the cartesian genetic programs, and each node has primitive functions, as well as the list of nodes that are adjacent. The extension takes a parameter of: num_input, num_output, arity, levels_back, num_row, num_col. Based on these parameters, the extension initially creates a random cartesian networks. At each time tick, the observation vector from NetLogo will be fed into the extension, and this will solve the cartesian network recursively from each output to input nodes. After each generation, the mutated cartesian network will then be reproduced. This procedure allows evolution to happen.
Figure 1: (left) Cartesian Genetic Programming Polynomial Model; (right) Cartesian Genetic Programming Mouse Model
In order to see the emergent pattern of cartesian genetic programming, two simple NetLogo models have constructed. Polynomial model simply trying to fit into the ground truth plot. In case of mouse model, it does not have any ground truth, while mouse (agents) have to earn more rewards by consuming safe cheese rather than poisonous cheese. Both polynomial prediction and mouse agent model are able to learn and evolve how to reduce error rates, and receive more rewards, respectively. Since it is an evolutionary algorithm, it is quite slow to notice its evolution; however, the result plots depict that the agents are learning, but slowly. Evolutionary algorithm is similar to the machine learning techniques, especially Q-learning, by considering that they get a reward after performing an action. However, Q-learning does not involve any mutation, so it is expected to be learning relatively faster than the evolutionary algorithms.
Figure 2: Robotic agent pairing up to perform collaborative task
Similar to the robotic simulation done, a collaborative method has been added and tested on cartesian genetic programming. This new collaborative model tests how well the agents could learn the collaborative task through cartesian genetic programming. In this modeled environment, the multiple robots that are performing package delivery actions are regarded as agents. Once after selecting the robot agent with the highest fitness value, this will then be passed into the next generation. The mutation happens here, and the robotic software will be copied into the robots in the following generation. By exploring and constructing this robotic model, the phenomena for the the micro- level of agents following rules, and the macro-level patterns will emerge. As a macro-level view, each robotic agent tend to pick up and then move directly to the destination area, and higher number of the collaboration is also to happening, as the evolution happens over time. As the time goes, the agents are moving together with a pair although they are not linked -performing a collaborative task together. The robotic agent is able to learn and evolve how to receive more rewards, and thus, building an optimal path of picking-up and dropping-off the package.
[Full Text] NetLogo Scala Extension of Cartesian Genetic Programming [ PDF ]
[Full Text] Collaborative Agent-Based Modeling with Cartesian Genetic Programming [ PDF ]
Proposed a NetLogo extension for cartesian genetic programming, and designed multiple models which agents can collaborate with each other.
Software/Language Used: NetLogo, Scala
Mar 2021 - Jun 2021
* This project was developed while affiliated to the Center for Connected Learning and Computer-Based Modeling (CCL Lab), at Northwestern University.