Repository navigation
Home
This project explores a simple question:
How much central control is necessary when the parts of a system can make useful decisions locally?
The simulation takes inspiration from an octopus: a central body has eight arms, and each arm can work towards its own objective. The central controller assigns intentions, such as reaching a position. The arm works out how its connected segments should move, responds to nearby obstacles, and can capture food through local contact.
The aim is to make this division of responsibility visible and understandable. It is a computational experiment, not a biologically exact reproduction of an octopus nervous system.
An instruction such as “reach that position” says what should happen without prescribing every joint angle. The arm turns that intention into movement through repeated exchanges between neighbouring segments.
This creates three levels of responsibility:
| Level | Responsibility | Example |
|---|---|---|
| Central controller | Assign an objective to an arm and receive significant reports | Ask Arm 3 to reach a position |
| Individual arm | Manage its own activity, contact and grasp state | Continue reaching, or establish a grip on food |
| Neighbouring segments | Make small adjustments within local movement limits | Request a different attachment position from the next segment towards the body |
flowchart TD
Objective["High-level objective"] --> Central["Central controller"]
Central --> Arm["An independently controlled arm"]
Arm --> Local["Neighbouring segments exchange requests"]
Local --> Movement["Small constrained movements"]
Environment["Food and obstacles"] --> Local
Movement --> Contact["Local contact and capture"]
Contact --> Report["Successful capture report"]
Report --> Central
The diagram follows one arm. The same arrangement is repeated across all eight arms, so one can hold food while another reaches and another remains idle.
The current experiment combines nine capabilities:
- Articulated reaching. An arm is a chain of fixed-length segments with limited relative bends
- Local segment control. Requests travel between neighbours instead of every joint aiming the distant tip directly at the target
- Independent arms. Each arm has its own objective, geometry and local state
- Local sensing. Segments detect contact with circular food and obstacle objects
- Obstacle avoidance. Nearby obstacles redirect local requests, while a separate movement check rejects unsafe crossings
- Grasping and carrying. Sustained adjacent food contacts establish a hold. The arm can carry the object, retract towards the body, or release it
- Local hazards and recoil. Arms detect nearby hazards and can interrupt reaching to recoil or steer away.
- Hazard escalation. Significant threats are reported to central control, potentially triggering withdrawal.
- Conflict resolution. Explicit priorities resolve competing safety responses, grips, shared targets and incidental discoveries.
A target marker represents an intended destination. It is not itself an object to touch. Food can be sensed and captured; obstacles constrain movement but cannot be grasped.
The initial scene gives the arms separate reach objectives. Arm 1 encounters food and can capture it. Arm 3 has an obstacle across its normal approach and demonstrates a detour. Other arms continue their own movements.
An arm's colour and number identify its target and status. Selecting an arm reveals its settings and sensing information. Targets and environmental objects can be moved to explore different arrangements. Pause and single-step make it possible to inspect movement and contact without relying on real-time observation alone.
Useful experiments include:
- Moving one target while watching whether the other arms change their behaviour.
- Varying segment count, length, bend limit or turning speed.
- Placing food so only one segment touches it, then moving it to touch two adjacent segments.
- Placing an obstacle across a reach, then moving it away from a blocked arm.
- Asking an arm to carry food through a gap wide enough for the arm but too narrow for the object.
Continue with Demonstrations for the progression of capabilities and Behaviour Showcase for a guided run.
Central Controller explains task assignment, Reach Controller and Arm Movement develops the movement and contact rules, and Hazards, Recoil and Conflict Resolution covers safety and competing intentions.
Architecture describes the implementation.
Distances are measured in screen pixels, and movement takes place in a flat, two-dimensional world. The body and arm attachments remain fixed. Segments do not stretch, and reaching is geometric rather than a simulation of muscles, water resistance or tissue forces.
Sensing strips stand in for individual suckers. A completed grasp becomes a rigid attachment rather than a detailed simulation of wrapping and friction. Arms and held food are checked against explicit obstacles, but the arms can cross one another and the body.
Local control does not guarantee a solution. Tight bends, unreachable targets or crowded obstacles can leave an arm blocked even when a different route might exist. The system favours holding its pose over forcing a crossing.
For a practical starting point, see Scenarios and try changing one variable at a time.
These simplifications keep the central question observable: how far can understandable local rules take a system before it needs more central coordination?