RoomEnv-v0
태스크의 하위 분류와 논문·코드·평가·기법·데이터셋을 탐색하세요.
- 하위 태스크
- 0
- 평가표
- 1
- 보존된 평가 기록
- 1
The Room environment - v0
We have released a challenging Gymnasium compatible environment. The best strategy for this environment is to have both episodic and semantic memory systems. See the paper for more information.
Prerequisites
- A unix or unix-like x86 machine
- python 3.10 or higher.
- Running in a virtual environment (e.g., conda, virtualenv, etc.) is highly recommended so that you don't mess up with the system python.
- This env is added to the PyPI server. Just run:
pip install room-env
Data collection
Data is collected from querying ConceptNet APIs. For simplicity, we only collect triples
whose format is (head, atlocation, tail). Here head is one of the 80 MS COCO
dataset categories. This was kept in mind so that later on we can use images as well.
If you want to collect the data manually, then run below:
python collect_data.py
How does this environment work?
The Gymnasium-compatible Room environment is one big room with
N<sub>people</sub> number of people who can freely move
around. Each of them selects one object, among
N<sub>objects</sub>, and places it in one of the
N<sub>locations</sub> locations.
N<sub>agents</sub> number of agent(s) are also in this
room. They can only observe one human placing an object, one at a time;
x<sup>(t)</sup>. At the same time, they are given one question
about the location of an object; q<sup>(t)</sup>.
x<sup>(t)</sup> is given as a quadruple,
(h<sup>(t)</sup>,r<sup>(t)</sup>,t<sup>(t)</sup>,t),
For example, <James’s laptop, atlocation, James’s desk, 42> accounts
for an observation where an agent sees James placing his laptop on his
desk at t = 42. q<sup>(t)</sup> is given as a double,
(h,r). For example, <Karen’s cat, atlocation> is asking where
Karen’s cat is located. If the agent answers the question correctly, it
gets a reward of + 1, and if not, it gets 0.
The reason why the observations and questions are given as RDF-triple-like format is two folds. One is that this structured format is easily readable / writable by both humans and machines. Second is that we can use existing knowledge graphs, such as ConceptNet .
To simplify the environment, the agents themselves are not actually moving, but the room is continuously changing. There are several random factors in this environment to be considered:
With the chance of p<sub>commonsense</sub>, a human places an object in a commonsense location (e.g., a laptop on a desk). The commonsense knowledge we use is from ConceptNet. With the chance of 1 − p<sub>commonsense</sub>, an object is placed at a non-commonsense random location (e.g., a laptop on the tree).
With the chance of p<sub>new_location</sub>, a human changes object location.
With the chance of p<sub>new_object</sub>, a human changes his/her object to another one.
With the chance of p<sub>switch_person</sub>, two people switch their locations. This is done to mimic an agent moving around the room.
All of the four probabilities account for the Bernoulli distributions.
Consider 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}.
Currently there is no RL trained for this. We only have some heuristics. Take a look at the paper for more details.
RoomEnv-v0
import gymnasium as gym
env = gym.make("room_env:RoomEnv-v0")
(observation, question), info = env.reset()
rewards = 0
while True:
(observation, question), reward, done, truncated, info = env.step("This is my answer!")
rewards += reward
if done:
break
print(rewards)
Every time when an agent takes an action, the environment will give you an observation
and a question to answer. You can try directly answering the question,
such as env.step("This is my answer!"), but a better strategy is to keep the
observations in memory systems and take advantage of the current observation and the
history of them in the memory systems.
Take a look at this repo for an actual interaction with this environment to learn a policy.
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Run
make test && make style && make qualityin the root repo directory, to ensure code quality. - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Cite our paper
@misc{https://doi.org/10.48550/arxiv.2204.01611,
doi = {10.48550/ARXIV.2204.01611},
url = {https://arxiv.org/abs/2204.01611},
author = {Kim, Taewoon and Cochez, Michael and Francois-Lavet, Vincent and Neerincx,
Mark and Vossen, Piek},
keywords = {Artificial Intelligence (cs.AI), FOS: Computer and information sciences,
FOS: Computer and information sciences},
title = {A Machine With Human-Like Memory Systems},
publisher = {arXiv},
year = {2022},
copyright = {Creative Commons Attribution 4.0 International}
}
Authors
License
하위 태스크
해결할 문제를 선택하세요. 같은 이름의 태스크는 상위 분야와 평가 조건으로 구분합니다.
더 세분화된 태스크가 없습니다.
관련 논문 살펴보기 →출처: Papers with Code · CC BY-SA 4.0. 아카이브 자료와 새로 수집한 논문은 별도로 관리합니다.