chemart / metabolic-robot-controller
View on GitHubMetabolic / artificial biochemical network robot controllers — A reaction network used as a brain. Sensors feed substances into the network, the network's own reactions process them, and a motor consumes the concentration of a designated actuator species - so the robot's behaviour *…
{"species": [{"id": "a", "structure": null}, {"id": "b", "structure": null}, {"id": "c", "structure": null}, {"id": "d", "structure": null}, {"id": "e", "structure": null}, {"id": "s1", "structure": null}, {"id": "s2", "structure": null}, {"id": "s3", "structure": null}], "reactions": [{"reactants": {"e": 1, "s2": 1}, "products": {"s3": 1}, "rate": {"law": "mass-action", "k": 1.0, "node": "r1"}, "count": null}, {"reactants": {"b": 1}, "products": {"s2": 1}, "rate": {"law": "mass-action", "k": 1.0, "node": "r2"}, "count": null}, {"reactants": {"b": 1, "c": 1}, "products": {"d": 1, "s2": 1}, "rate": {"law": "mass-action", "k": 1.0, "node": "r3", "inhibitor": "s3", "k_inhibition": 10.0}, "count": null}, {"reactants": {"e": 1}, "products": {"a": 2}, "rate": {"law": "mass-action", "k": 1.0, "node": "r4"}, "count": null}, {"reactants": {"s2": 2}, "products": {"e": 1, "s2": 1}, "rate": {"law": "mass-action", "k": 1.0, "node": "r5"}, "count": null}, {"reactants": {"s2": 2, "d": 1}, "products": {"e": 1, "s2": 1, "d": 1}, "rate": {"law": "mass-action", "k": 10.0, "node": "r5", "catalyst": "d", "k_catalysis": 10.0}, "count": null}, {"reactants": {"a": 1, "d": 1}, "products": {"s3": 1}, "rate": {"law": "mass-action", "k": 1.0, "node": "r6"}, "count": null}, {"reactants": {"b": 1, "e": 1}, "products": {"a": 1, "c": 1}, "rate": {"law": "mass-action", "k": 1.0, "node": "r7"}, "count": null}, {"reactants": {"b": 1, "e": 1, "s2": 1}, "products": {"a": 1, "c": 1, "s2": 1}, "rate": {"law": "mass-action", "k": 10.0, "node": "r7", "catalyst": "s2", "k_catalysis": 10.0}, "count": null}, {"reactants": {"s3": 1}, "products": {"s1": 1}, "rate": {"law": "mass-action", "k": 1.0, "node": "r8"}, "count": null}, {"reactants": {"s3": 1, "s2": 1}, "products": {"s1": 1, "s2": 1}, "rate": {"law": "mass-action", "k": 10.0, "node": "r8", "catalyst": "s2", "k_catalysis": 10.0}, "count": null}], "status": "complete", "initial_state": null, "inflow": {"b": 0.1, "c": 0.1, "d": 0.1, "e": 0.1}, "outflow": {"a": 0.9}, "extras": {"conservation": [{"name": "material balance", "vector": {"a": 1, "b": 2, "c": 3, "d": 3, "e": 2, "s1": 4, "s2": 2, "s3": 4}, "unique": true}], "reaction_graph": [{"id": "r1", "type": 5, "reactants": ["e", "s2"], "products": ["s3"], "k": 1.0, "network_reactions": [0]}, {"id": "r2", "type": 4, "reactants": ["b"], "products": ["s2"], "k": 1.0, "network_reactions": [1]}, {"id": "r3", "type": 7, "reactants": ["b", "c"], "products": ["d", "s2"], "k": 1.0, "network_reactions": [2], "modifier": {"species": "s3", "effect": "inhibitive", "k": 10.0}}, {"id": "r4", "type": 6, "reactants": ["e"], "products": ["a", "a"], "k": 1.0, "network_reactions": [3]}, {"id": "r5", "type": 7, "reactants": ["s2", "s2"], "products": ["e", "s2"], "k": 1.0, "network_reactions": [4, 5], "modifier": {"species": "d", "effect": "catalytic", "k": 10.0}}, {"id": "r6", "type": 5, "reactants": ["a", "d"], "products": ["s3"], "k": 1.0, "network_reactions": [6]}, {"id": "r7", "type": 7, "reactants": ["b", "e"], "products": ["a", "c"], "k": 1.0, "network_reactions": [7, 8], "modifier": {"species": "s2", "effect": "catalytic", "k": 10.0}}, {"id": "r8", "type": 4, "reactants": ["s3"], "products": ["s1"], "k": 1.0, "network_reactions": [9, 10], "modifier": {"species": "s2", "effect": "catalytic", "k": 10.0}}], "input_set": ["b", "c", "d", "e"], "output_set": ["a"], "sensors": {"b": {"sensors": ["left1", "left2"], "inflow": "max_inflow * max(sensor values) / 1023 per reactor iteration, as a fraction of the reactor volume (eq. 30)"}, "c": {"sensors": ["front1", "front2"], "inflow": "max_inflow * max(sensor values) / 1023 per reactor iteration, as a fraction of the reactor volume (eq. 30)"}, "d": {"sensors": ["right1", "right2"], "inflow": "max_inflow * max(sensor values) / 1023 per reactor iteration, as a fraction of the reactor volume (eq. 30)"}, "e": {"sensors": ["back1", "back2"], "inflow": "max_inflow * max(sensor values) / 1023 per reactor iteration, as a fraction of the reactor volume (eq. 30)"}}, "actuators": {"a": {"action": "rotate", "meaning": "above the threshold, switch the rotation direction of one motor (Ziegler & Banzhaf 2001, sec. 5.2)", "threshold": 0.1, "consumption_rate": 0.9, "outflow": "alpha * [s] while [s] > a_min, otherwise 0 (eq. 31)"}}}, "chemistry": "metabolic-robot-controller", "params": {"n_substances": 8, "n_reactions": 8, "reaction_types": [4, 5, 6, 7], "p_modifier": 0.5, "p_inhibitor": 0.5, "k_0": 1.0, "k_min": 10.0, "k_max": 10.0, "sensor_map": {"b": ["left1", "left2"], "c": ["front1", "front2"], "d": ["right1", "right2"], "e": ["back1", "back2"]}, "sensor_readings": {"left1": 1023, "left2": 1023, "front1": 1023, "front2": 1023, "right1": 1023, "right2": 1023, "back1": 1023, "back2": 1023}, "max_inflow": 0.1, "actuator_map": {"a": "rotate"}, "alpha": 0.9, "a_min": 0.1}, "seed": 1}