KoeYe commited on
Commit
e48f95d
·
verified ·
1 Parent(s): 616dcf6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +281 -3
README.md CHANGED
@@ -1,3 +1,281 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SimWorld: An Open-ended Realistic Simulator for Autonomous Agents in Physical and Social Worlds
2
+ <p align="center">
3
+ <img src="https://github.com/user-attachments/assets/5d2da588-9470-44ef-82a9-5d45d592497a" width="840" height="795" alt="image" />
4
+ </p>
5
+
6
+
7
+ **SimWorld** is a simulation platform for developing and evaluating **LLM/VLM** AI agents in complex physical and social environments.
8
+
9
+ <div align="center">
10
+ <a href="https://simworld-ai.github.io/"><img src="https://img.shields.io/badge/Website-SimWorld-blue" alt="Website" /></a>
11
+ <a href="https://github.com/maitrix-org/SimWorld"><img src="https://img.shields.io/github/stars/maitrix-org/SimWorld?style=social" alt="GitHub Stars" /></a>
12
+ <a href="https://simworld.readthedocs.io/en/latest"><img src="https://img.shields.io/badge/Documentation-Read%20Docs-green" alt="Documentation" /></a>
13
+ <a href="https://arxiv.org/abs/2512.01078"><img src="https://img.shields.io/badge/arXiv-2512.01078-b31b1b?logo=arxiv&logoColor=white" alt="arXiv:2512.01078" /></a>
14
+ </div>
15
+
16
+ ## 🔥 News
17
+ - 2025.11 The white paper of **SimWorld** is available on arxiv!
18
+ - 2025.9 **SimWorld** has been accepted to NeurIPS 2025 main track as a **spotlight** paper! 🎉
19
+ - 2025.6 The first formal release of **SimWorld** has been published! 🚀
20
+ - 2025.3 Our demo of **SimWorld** has been accepted by CVPR 2025 Demonstration Track! 🎉
21
+
22
+ ## 💡 Introduction
23
+ SimWorld is built on Unreal Engine 5 and offers core capabilities to meet the needs of modern agent development. It provides:
24
+ - Realistic, open-ended world simulation with accurate physics and language-based procedural generation.
25
+ - Rich interface for LLM/VLM agents, supporting multi-modal perception and natural language actions.
26
+ - Diverse and customizable physical and social reasoning scenarios, enabling systematic training and evaluation of complex agent behaviors like navigation, planning, and strategic cooperation.
27
+
28
+ ## 🏗️ Architecture
29
+ <p align="center">
30
+ <img width="799" height="671" alt="image" src="https://github.com/user-attachments/assets/2e67356a-7dca-4eba-ab57-de1226e080bb" />
31
+ </p>
32
+
33
+ **SimWorld** consists of three layers:
34
+ - the Unreal Engine Backend, providing diverse and open-ended environments, rich assets and realistic physics simulation;
35
+ - the Environment layer, supporting procedural city generation, language-driven scene editing, gym-like APIs for LLM/VLM agents and traffic simulation;
36
+ - the Agent layer, enabling LLM/VLM agents to reason over multimodal observations and history while executing actions via a local action planner;
37
+
38
+ SimWorld's architecture is designed to be modular and flexible, supporting an array of functionalities such as dynamic world generation, agent control, and performance benchmarking. The components are seamlessly integrated to provide a robust platform for **Embodied AI** and **Agents** research and applications.
39
+
40
+ ### Project Structure
41
+ ```bash
42
+ simworld/ # Python package
43
+ local_planner/ # Local action planner component
44
+ agent/ # Agent system
45
+ assets_rp/ # Live editor component for retrieval and re-placing
46
+ citygen/ # City layout procedural generator
47
+ communicator/ # Core component to connect Unreal Engine
48
+ config/ # Configuration loader and default config file
49
+ llm/ # Basic llm class
50
+ map/ # Basic map class and waypoint system
51
+ traffic/ # Traffic system
52
+ utils/ # Utility functions
53
+ data/ # Necessary input data
54
+ config/ # Example configuration file and user configuration file
55
+ scripts/ # Examples of usage, such as layout generation and traffic simulation
56
+ docs/ # Documentation source files
57
+ README.md
58
+ ```
59
+
60
+ ## Setup
61
+ ### Installation
62
+ + Python Client
63
+ Make sure to use Python 3.10 or later.
64
+ ```bash
65
+ git clone https://github.com/SimWorld-AI/SimWorld.git
66
+ cd SimWorld
67
+ conda create -n simworld python=3.10
68
+ conda activate simworld
69
+ pip install -e .
70
+ ```
71
+
72
+ + UE server
73
+ Download the SimWorld server executable from S3:
74
+
75
+ We offer two versions of the SimWorld UE package: the base version, which comes with an empty map, and the additional environments version, which provides extra pre-defined environments for more diverse simulation scenarios. Both versions include all the core features of SimWorld.
76
+
77
+ | Platform | Package | Scenes/Maps Included | Download | Notes |
78
+ | --- | --- | --- | --- | --- |
79
+ | Windows | Base | Empty map for procedural generation | [Download (Base)](https://simworld-release.s3.us-east-1.amazonaws.com/SimWorld-Win64-v0_1_0-Foundation.zip) | Full agent features; smaller download. |
80
+ | Windows | Additional Environments | 100+ maps (including the empty one) | [Download (100+ Maps)](https://simworld-release.s3.us-east-1.amazonaws.com/SimWorld-Win64-v0_1_0-100Maps.zip) | Full agent features; larger download. |
81
+ | Linux | Base | Empty map for procedural generation | [Download (Base)](https://simworld-release.s3.us-east-1.amazonaws.com/SimWorld-Linux-v0_1_0-Foundation.zip) | Full agent features; smaller download. |
82
+ | Linux | Additional Environments | 100+ maps (including the empty one) | [Download (100+ Maps)](https://simworld-release.s3.us-east-1.amazonaws.com/SimWorld-Linux-v0_1_0-100Maps.zip) | Full agent features; larger download. |
83
+
84
+
85
+ **Note:**
86
+ 1. Please check the [documentation](https://simworld.readthedocs.io/en/latest/getting_started/additional_environments.html#usage) for usage instructions of the **100+ Maps** version.
87
+ 2. If you only need core functionality for development or testing, use **Base**. If you want richer demonstrations and more scenes, use the **Additional Environments (100+ Maps)**.
88
+
89
+ ### Quick Start
90
+
91
+ We provide several examples of code in `examples/`, showcasing how to use the basic functionalities of SimWorld, including city layout generation, traffic simulation, asset retrieval, and activity-to-actions. Please follow the examples to see how SimWorld works.
92
+
93
+ #### Configuration
94
+
95
+ SimWorld uses YAML-formatted configuration files for system settings. The default configuration files are located in the `simworld/config` directory while user configurations are placed in the `config` directory.
96
+
97
+ - `simworld/config/default.yaml` serves as the default configuration file.
98
+ - `config/example.yaml` is provided as a template for custom configurations.
99
+
100
+ Users can switch between different configurations by specifying a custom configuration file path through the `Config` class:
101
+
102
+ To set up your own configuration:
103
+
104
+ 1. Create your custom configuration by copying the example template:
105
+ ```bash
106
+ cp config/example.yaml config/your_config.yaml
107
+ ```
108
+
109
+ 2. Modify the configuration values in `your_config.yaml` according to your needs
110
+
111
+ 3. Load your custom configuration in your code:
112
+ ```python
113
+ from simworld.config import Config
114
+ config = Config('path/to/your_config') # use absolute path here
115
+ ```
116
+
117
+ #### Agent Action Space
118
+ SimWorld provides a comprehensive action space for pedestrians, vehicles and robots (e.g., move forward, sit down, pick up). For more details, see [actions](https://simworld.readthedocs.io/en/latest/components/ue_detail.html#actions) and `examples/ue_command.ipynb`.
119
+
120
+ #### Using the Camera
121
+ SimWorld supports a variety of sensors, including RGB images, segmentation maps, and depth images. For more details, please refer to the [sensors](https://simworld.readthedocs.io/en/latest/components/ue_detail.html#sensors) and the example script `examples/camera.ipynb`.
122
+
123
+ #### Commonly Used APIs
124
+ All APIs are located in `simworld/communicator`. Some of the most commonly used ones are listed below:
125
+ - `communicator.get_camera_observation`
126
+ - `communicator.spawn_object`
127
+ - `communicator.spawn_agent`
128
+ - `communicator.generate_world`
129
+ - `communicator.clear_env`
130
+
131
+ #### Simple Running Example
132
+
133
+ Once the SimWorld UE5 environment is running, you can connect from Python and control an in-world humanoid agent in just a few lines:
134
+ (The whole example of minimal demo is shown in `examples/gym_interface_demo.ipynb`)
135
+
136
+ ```python
137
+ from simworld.communicator.unrealcv import UnrealCV
138
+ from simworld.communicator.communicator import Communicator
139
+ from simworld.agent.humanoid import Humanoid
140
+ from simworld.utils.vector import Vector
141
+ from simworld.llm.base_llm import BaseLLM
142
+ from simworld.local_planner.local_planner import LocalPlanner
143
+ from simworld.llm.a2a_llm import A2ALLM
144
+
145
+
146
+ # Connect to the running Unreal Engine instance via UnrealCV
147
+ ucv = UnrealCV()
148
+ comm = Communicator(ucv)
149
+
150
+ class Agent:
151
+ def __init__(self, goal):
152
+ self.goal = goal
153
+ self.llm = BaseLLM("gpt-4o")
154
+ self.system_prompt = f"You are an intelligent agent in a 3D world. Your goal is to: {self.goal}."
155
+
156
+ def action(self, obs):
157
+ prompt = f"{self.system_prompt}\n You are currently at: {obs}\nWhat is your next action?"
158
+ action = self.llm.generate_text(system_prompt=self.system_prompt, user_prompt=prompt)
159
+ return action
160
+
161
+ class Environment:
162
+ def __init__(self, comm: Communicator):
163
+ self.comm = comm
164
+ self.agent: Humanoid | None = None
165
+ self.action_planner = None
166
+ self.agent_name: str | None = None
167
+ self.target: Vector | None = None
168
+ self.action_planner_llm = A2ALLM(model_name="gpt-4o-mini")
169
+
170
+ def reset(self):
171
+ """Clear the UE scene and (re)spawn the humanoid and target."""
172
+ # Clear spawned objects
173
+ self.comm.clear_env()
174
+
175
+ # Blueprint path for the humanoid agent to spawn in the UE level
176
+ agent_bp = "/Game/TrafficSystem/Pedestrian/Base_User_Agent.Base_User_Agent_C"
177
+
178
+ # Initial spawn position and facing direction for the humanoid (2D)
179
+ spawn_location, spawn_forward = Vector(0, 0), Vector(0, 1)
180
+ self.agent = Humanoid(spawn_location, spawn_forward)
181
+ self.action_planner = LocalPlanner(agent=self.agent, model=self.action_planner_llm, rule_based=False)
182
+
183
+ # Spawn the humanoid agent in the Unreal world
184
+ self.comm.spawn_agent(self.agent, name=None, model_path=agent_bp, type="humanoid")
185
+
186
+ # Define a target position the agent is encouraged to move toward (example value)
187
+ self.target = Vector(1000, 0)
188
+
189
+ # Return initial observation (optional, but RL-style)
190
+ observation = self.comm.get_camera_observation(self.agent.camera_id, "lit")
191
+
192
+ return observation
193
+
194
+ def step(self, action):
195
+ """Use action planner to execute the given action."""
196
+ # Parse the action text and map it to the action space
197
+ primitive_actions = self.action_planner.parse(action)
198
+
199
+ self.action_planner.execute(primitive_actions)
200
+
201
+ # Get current location from UE (x, y, z) and convert to 2D Vector
202
+ location = Vector(*self.comm.unrealcv.get_location(self.agent)[:2])
203
+
204
+ # Camera observation for RL
205
+ observation = self.comm.get_camera_observation(self.agent.camera_id, "lit")
206
+
207
+ # Reward: negative Euclidean distance in 2D plane
208
+ reward = -location.distance(self.target)
209
+
210
+ return observation, reward
211
+
212
+
213
+ if __name__ == "__main__":
214
+ # Create the environment wrapper
215
+ agent = Agent(goal='Go to (1700, -1700) and pick up GEN_BP_Box_1_C.')
216
+ env = Environment(comm)
217
+
218
+ obs = env.reset()
219
+
220
+ # Roll out a short trajectory
221
+ for _ in range(100):
222
+ action = agent.action(obs)
223
+ obs, reward = env.step(action)
224
+ print(f"obs: {obs}, reward: {reward}")
225
+ # Plug this into your RL loop / logging as needed
226
+ ```
227
+
228
+
229
+ ## For Contributors
230
+ ### Precommit Setup
231
+
232
+ We use Google docstring format for our docstrings and the pre-commit library to check our code. To install pre-commit, run the following command:
233
+
234
+ ```bash
235
+ conda install pre-commit # or pip install pre-commit
236
+ pre-commit install
237
+ ```
238
+
239
+ The pre-commit hooks will run automatically when you try to commit changes to the repository.
240
+
241
+
242
+ ### Commit Message Guidelines
243
+ All commit messages should be clear, concise, and follow this format:
244
+ ```
245
+ <type>: <short summary>
246
+
247
+ [optional body explaining the change]
248
+ ```
249
+ Recommended types:
250
+ + feat: A new feature
251
+ + fix: A bug fix
252
+ + docs: Documentation changes
253
+ + refactor: Code restructuring without behavior changes
254
+ + style: Code style changes (formatting, linting)
255
+ + test: Adding or updating tests
256
+ + chore: Non-code changes (e.g., updating dependencies)
257
+
258
+ Example:
259
+ ```
260
+ feat: add user login API
261
+ ```
262
+
263
+ ### Issue Guidelines
264
+ + Use clear titles starting with [Bug] or [Feature].
265
+ + Describe the problem or request clearly.
266
+ + Include steps to reproduce (for bugs), expected behavior, and screenshots if possible.
267
+ + Mention your environment (OS, browser/runtime, version, etc.).
268
+
269
+ ### Pull Request Guidelines
270
+ + Fork the repo and create a new branch (e.g., feature/your-feature, fix/bug-name).
271
+ + Keep PRs focused: one feature or fix per PR.
272
+ + Follow the project’s coding style and naming conventions.
273
+ + Test your changes before submitting.
274
+ + Link related issues using Fixes #issue-number if applicable.
275
+ + Add comments or documentation if needed.
276
+
277
+ We appreciate clean, well-described contributions! 🚀
278
+
279
+ ## Star History
280
+
281
+ [![Star History Chart](https://api.star-history.com/svg?repos=SimWorld-AI/SimWorld&type=date&legend=bottom-right)](https://www.star-history.com/#SimWorld-AI/SimWorld&type=date&legend=bottom-right)