{"id":50640209,"url":"https://github.com/naghim/representational-structures","last_synced_at":"2026-06-07T07:30:37.510Z","repository":{"id":360222954,"uuid":"1249225582","full_name":"naghim/representational-structures","owner":"naghim","description":"This project studies whether evolution favors agents tuned to fitness rather than objective reality - a question central to Donald Hoffman's interface theory of perception. It extends the classic \"Robby the Robot\" problem (Melanie Mitchell) using genetic algorithms and neuroevolution in both 2D and 3D environments.","archived":false,"fork":false,"pushed_at":"2026-05-25T13:33:52.000Z","size":1012,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-25T15:27:51.687Z","etag":null,"topics":["agents","donald-hoffman","evolution-of-perception","evolution-of-representational-structures","evolutionary-algorithms","generic-algorithm","interface-theory","melanie-mitchell","neuroevolution"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/naghim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-25T13:32:07.000Z","updated_at":"2026-05-25T13:37:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/naghim/representational-structures","commit_stats":null,"previous_names":["naghim/representational-structures"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/naghim/representational-structures","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naghim%2Frepresentational-structures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naghim%2Frepresentational-structures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naghim%2Frepresentational-structures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naghim%2Frepresentational-structures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naghim","download_url":"https://codeload.github.com/naghim/representational-structures/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naghim%2Frepresentational-structures/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34013240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agents","donald-hoffman","evolution-of-perception","evolution-of-representational-structures","evolutionary-algorithms","generic-algorithm","interface-theory","melanie-mitchell","neuroevolution"],"created_at":"2026-06-07T07:30:36.380Z","updated_at":"2026-06-07T07:30:37.505Z","avatar_url":"https://github.com/naghim.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Representational Structures\n\nEvolution of perception and representational structures in artificial agents.\n\nThis project studies whether evolution favors agents tuned to **fitness** rather than **objective reality** - a question central to Donald Hoffman's interface theory of perception. It extends the classic \"Robby the Robot\" problem (Melanie Mitchell) using genetic algorithms and neuroevolution in both 2D and 3D environments.\n\n\u003e This is a modernized refactor of the [original thesis repository](https://github.com/naghim/Evolution-of-Representational-Structures), which remains archived at its original location.\n\n## Overview\n\nAn agent (\"Robby\") navigates a grid collecting water resources with varying quantities. Its perception of water as \"red\" (low-value) or \"green\" (high-value) is encoded in its genome - evolution determines whether agents perceive reality veridically or develop interface strategies tuned to fitness.\n\n### Experiments\n\n| Experiment         | Space         | Controller                  | Actions                                | Key feature                    |\n| ------------------ | ------------- | --------------------------- | -------------------------------------- | ------------------------------ |\n| GA-I               | 2D (10×10)    | Genetic algorithm           | 7 (move N/S/E/W, stay, pickup, random) | Baseline foraging              |\n| GA-II              | 2D (10×10)    | Genetic algorithm           | 9 (+ rotate left/right)                | Rotation + sight penalty       |\n| GA-II 3D           | 3D (10×10×10) | Genetic algorithm           | 9 (+ move up/down)                     | Scalability to 3D              |\n| GA-III             | 2D (10×10)    | Genetic algorithm           | 9                                      | Evolve which directions to see |\n| NN (memory)        | 3D            | Neural network (19→30+1→18) | 14                                     | 4 memory feedback neurons      |\n| NN (no memory)     | 3D            | Neural network (19→30+1→18) | 14                                     | No memory                      |\n| NN (sight penalty) | 3D            | Neural network              | 14                                     | Evolve perception directions   |\n\n## Getting started\n\n```bash\nuv sync                 # create venv and install all deps\nuv run scripts/ga_i.py  # run GA-I experiment\n```\n\n## Repository layout\n\n```\n├── src/robby/            # Python package\n│   ├── environment.py    # 2D/3D grid environments\n│   ├── perception.py     # Perception encoding \u0026 state computation\n│   ├── simulation.py     # Agent actions, rewards, simulation loop\n│   ├── agent.py          # GA individual \u0026 neural network\n│   └── experiments.py    # DEAP-based experiment runners\n├── scripts/              # Entry points for experiments + visualization\n├── UIs/                  # WPF apps for human-comparison studies\n└── pyproject.toml\n```\n\n## Agent visualization\n\nThe `scripts/visualize_agent.py` script loads a pre-evolved GA-II genome and replays its behavior on a fixed 12×12 map, generating an animated GIF. Each frame shows the grid colored by Robby's perceived view: cells appear **red** or **green** depending on how the agent's water-color genes map the underlying quantity, and Robby's position is shown in dark blue. This way we can actually see how the evolved perception strategy drives foraging decisions.\n\n## Companion UIs\n\nThe `UIs/` directory contains three WPF companion applications designed for **human-comparison studies**. They let human participants control Robby's behavior and test whether they can come up with a winning strategy, mirroring the evolutionary agent's task.\n\nEach version progressively removes human-interpretable information:\n\n| Version      | What the user sees                                                                                                                                 |\n| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **UI ver 1** | Full grid layout with water quantities and Robby's position - maximum information                                                                  |\n| **UI ver 2** | Grid structure preserved, but Robby has limited field of vision                                                                                    |\n| **UI ver 3** | Everything stripped away - the user sees only **5 abstract symbols in a row** corresponding to a word, mimicking the agent's perception bottleneck |\n\n## References\n\n- [Mitchell, M _Robby the Robot_](https://melaniemitchell.me/ExplorationsContent/RobbyTheRobot/)\n- Mitchell, M. _Complexity: A Guided Tour_. Oxford University Press, 2009.\n- Hoffman, D. D. _The Case Against Reality_. W. W. Norton, 2019.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaghim%2Frepresentational-structures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaghim%2Frepresentational-structures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaghim%2Frepresentational-structures/lists"}