{"url":"/task/roomenv-v0","name":"RoomEnv-v0","slug":"roomenv-v0","description_markdown":"# The Room environment - v0\r\n\r\n[![DOI](https://img.shields.io/badge/Paper-PDF-red.svg)](https://arxiv.org/abs/2204.01611)\r\n\r\nWe have released a challenging [Gymnasium](https://www.gymlibrary.dev/) compatible\r\nenvironment. The best strategy for this environment is to have both episodic and semantic\r\nmemory systems. See the paper for more information.\r\n\r\n## Prerequisites\r\n\r\n1. A unix or unix-like x86 machine\r\n1. python 3.10 or higher.\r\n1. Running in a virtual environment (e.g., conda, virtualenv, etc.) is highly recommended so that you don't mess up with the system python.\r\n1. This env is added to the PyPI server. Just run: `pip install room-env`\r\n\r\n## Data collection\r\n\r\nData is collected from querying ConceptNet APIs. For simplicity, we only collect triples\r\nwhose format is (`head`, `atlocation`, `tail`). Here `head` is one of the 80 MS COCO\r\ndataset categories. This was kept in mind so that later on we can use images as well.\r\n\r\nIf you want to collect the data manually, then run below:\r\n\r\n```\r\npython collect_data.py\r\n```\r\n\r\n## How does this environment work?\r\n\r\nThe Gymnasium-compatible Room environment is one big room with\r\n_N_<sub>_people_</sub> number of people who can freely move\r\naround. Each of them selects one object, among\r\n_N_<sub>_objects_</sub>, and places it in one of the\r\n_N_<sub>_locations_</sub> locations.\r\n_N_<sub>_agents_</sub> number of agent(s) are also in this\r\nroom. They can only observe one human placing an object, one at a time;\r\n**x**<sup>(_t_)</sup>. At the same time, they are given one question\r\nabout the location of an object; **q**<sup>(_t_)</sup>.\r\n**x**<sup>(_t_)</sup> is given as a quadruple,\r\n(**h**<sup>(_t_)</sup>,**r**<sup>(_t_)</sup>,**t**<sup>(_t_)</sup>,_t_),\r\nFor example, `<James’s laptop, atlocation, James’s desk, 42>` accounts\r\nfor an observation where an agent sees James placing his laptop on his\r\ndesk at *t* = 42. **q**<sup>(_t_)</sup> is given as a double,\r\n(**h**,**r**). For example, `<Karen’s cat, atlocation>` is asking where\r\nKaren’s cat is located. If the agent answers the question correctly, it\r\ngets a reward of  + 1, and if not, it gets 0.\r\n\r\nThe reason why the observations and questions are given as\r\nRDF-triple-like format is two folds. One is that this structured format\r\nis easily readable / writable by both humans and machines. Second is\r\nthat we can use existing knowledge graphs, such as ConceptNet .\r\n\r\nTo simplify the environment, the agents themselves are not actually\r\nmoving, but the room is continuously changing. There are several random\r\nfactors in this environment to be considered:\r\n\r\n1. With the chance of _p_<sub>commonsense</sub>,\r\n   a human places an object in a commonsense location (e.g., a laptop\r\n   on a desk). The commonsense knowledge we use is from ConceptNet.\r\n   With the chance of\r\n   1 − *p*<sub>_commonsense_</sub>, an object is\r\n   placed at a non-commonsense random location (e.g., a laptop on the\r\n   tree).\r\n\r\n1. With the chance of\r\n   _p_<sub>_new_\\__location_</sub>, a human changes\r\n   object location.\r\n\r\n1. With the chance of _p_<sub>_new_\\__object_</sub>, a\r\n   human changes his/her object to another one.\r\n\r\n1. With the chance of\r\n   _p_<sub>_switch_\\__person_</sub>, two people\r\n   switch their locations. This is done to mimic an agent moving around\r\n   the room.\r\n\r\nAll of the four probabilities account for the Bernoulli distributions.\r\n\r\nConsider there is only one agent. Then this is a POMDP, where _S_<sub>_t_</sub> = (**x**<sup>(_t_)</sup>, **q**<sup>(_t_)</sup>), _A_<sub>_t_</sub> = (do something with **x**<sup>(_t_)</sup>, answer **q**<sup>(_t_)</sup>), and _R_<sub>_t_</sub> ∈ *{0, 1}*.\r\n\r\nCurrently there is no RL trained for this. We only have some heuristics. Take a look at the paper for more details.\r\n\r\n## RoomEnv-v0\r\n\r\n```python\r\nimport gymnasium as gym\r\n\r\nenv = gym.make(\"room_env:RoomEnv-v0\")\r\n(observation, question), info = env.reset()\r\nrewards = 0\r\n\r\nwhile True:\r\n    (observation, question), reward, done, truncated, info = env.step(\"This is my answer!\")\r\n    rewards += reward\r\n    if done:\r\n        break\r\n\r\nprint(rewards)\r\n```\r\n\r\nEvery time when an agent takes an action, the environment will give you an observation\r\nand a question to answer. You can try directly answering the question,\r\nsuch as `env.step(\"This is my answer!\")`, but a better strategy is to keep the\r\nobservations in memory systems and take advantage of the current observation and the\r\nhistory of them in the memory systems.\r\n\r\nTake a look at [this repo](https://github.com/humemai/humemai) for an actual\r\ninteraction with this environment to learn a policy.\r\n\r\n## Contributing\r\n\r\nContributions are what make the open source community such an amazing place to be learn,\r\ninspire, and create. Any contributions you make are **greatly appreciated**.\r\n\r\n1. Fork the Project\r\n1. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\r\n1. Run `make test && make style && make quality` in the root repo directory,\r\n   to ensure code quality.\r\n1. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\r\n1. Push to the Branch (`git push origin feature/AmazingFeature`)\r\n1. Open a Pull Request\r\n\r\n## [Cite our paper](https://arxiv.org/abs/2204.01611)\r\n\r\n```bibtex\r\n@misc{https://doi.org/10.48550/arxiv.2204.01611,\r\n  doi = {10.48550/ARXIV.2204.01611},\r\n  url = {https://arxiv.org/abs/2204.01611},\r\n  author = {Kim, Taewoon and Cochez, Michael and Francois-Lavet, Vincent and Neerincx,\r\n  Mark and Vossen, Piek},\r\n  keywords = {Artificial Intelligence (cs.AI), FOS: Computer and information sciences,\r\n  FOS: Computer and information sciences},\r\n  title = {A Machine With Human-Like Memory Systems},\r\n  publisher = {arXiv},\r\n  year = {2022},\r\n  copyright = {Creative Commons Attribution 4.0 International}\r\n}\r\n```\r\n\r\n## Authors\r\n\r\n- [Taewoon Kim](https://taewoon.kim/)\r\n- [Michael Cochez](https://www.cochez.nl/)\r\n- [Vincent Francois-Lavet](http://vincent.francois-l.be/)\r\n- [Mark Neerincx](https://ocw.tudelft.nl/teachers/m_a_neerincx/)\r\n- [Piek Vossen](https://vossen.info/)\r\n\r\n## License\r\n\r\n[MIT](https://choosealicense.com/licenses/mit/)","categories":[{"name":"Computer Code","url":"/area/computer-code"},{"name":"Computer Vision","url":"/area/computer-vision"},{"name":"Knowledge Base","url":"/area/knowledge-base"},{"name":"Methodology","url":"/area/methodology"}],"source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","slug_source":"archive_url"},"counts":{"papers_tagged":1,"papers_with_code":1,"benchmarks":1,"benchmark_tables_in_archive":1,"benchmark_tables_shown":1,"benchmark_tables_withheld_as_spam":0,"benchmark_definition":"a leaderboard table with at least one row; benchmark_tables_shown also counts the zero-row tables; benchmark_tables_in_archive adds the tables withheld as spam","datasets":1,"subtasks":0,"parent_tasks":1},"benchmarks":[{"leaderboard":"/sota/roomenv-v0-on-roomenv-v0","slug":"roomenv-v0-on-roomenv-v0","dataset":"RoomEnv-v0","dataset_url":"/dataset/roomenv","rows_in_archive":1,"metrics":["final agent reward"],"first_row_in_archive_order":{"model":"HumemAI-v0-handcrafted-capacity=32","paper_title":"A Machine With Human-Like Memory Systems","paper_url":"/paper/a-machine-with-human-like-memory-systems","paper_date":"2022-04-04","arxiv_id":"2204.01611","code_links":[{"title":"humemai/agent-room-env-v0","url":"https://github.com/humemai/agent-room-env-v0"}],"syntology":null}}],"datasets":[{"url":"/dataset/roomenv","name":"RoomEnv-v0","full_name":"The Room environment - v0","num_papers_in_archive":1}],"subtasks":[],"parent_tasks":[{"url":"/task/reinforcement-learning-1","name":"Reinforcement Learning (RL)"}],"papers":{"order":"repositories listed in the archive (desc), then date (desc); the archive holds no stars","population":"papers tagged with this task that list at least one repository in the archive","shown":1,"of":1,"tagged_in_all":1,"items":[{"url":"/paper/a-machine-with-human-like-memory-systems","title":"A Machine With Human-Like Memory Systems","date":"2022-04-04","arxiv_id":"2204.01611","repositories_listed":1,"syntology":null}],"syntology_records":0,"syntology_note":"a paper without a record is not a recorded non-run: it may lack an arXiv id or simply be absent from the graph layer"},"description_links":{"kept":0,"unwrapped_to_text":0,"bare_urls_linked":0,"relative_images_dropped":0,"rule":"internal links are kept only when the target slug exists in the catalog"},"syntology":{"read_at":"2026-09-25T09:33:49+00:00","claim":"Per-sample execution status on synthesized fixtures ('ran N of M samples'); not a correctness claim and not a ranking signal.","status_vocabulary":{"ran_honours":"ran, honoured the contract we drafted","ran_violates":"ran, violated the contract we drafted","ran_draft_wrong":"ran; our contract draft was wrong, not the code","ran_fixture":"ran; our fixture could not drive it","ran":"ran on a synthesized input","unverified":"unverified (harvested, no recorded run)"}},"not_shown":{"libraries":"the archive has no per-task library table","trend_sparklines":"the Trend column of the benchmarks table was a rendered image; it is not in the archive","social_and_latest_sorts":"stars and social signals are not in the archive"}}