michaelkoelle / marl-aquarium

Aquarium: A Comprehensive Framework for Exploring Predator-Prey Dynamics through Multi-Agent Reinforcement Learning Algorithms
MIT License
4 stars 4 forks source link

render_mode #1

Closed kudouxiao closed 6 months ago

kudouxiao commented 6 months ago

"rgb_array" is not useful, is it because it is not yet supported? Is there still a bug?

michaelkoelle commented 6 months ago

Currently, there is only one render mode implemented: "human". We could easily implement a rgb_array representation of the screen. Can you specify what your expected output would be? Do you need a separate representation for each agent?

kudouxiao commented 6 months ago

Thank you for the reply. I hope to convert game screenshots into an RGB array (numpy.ndarray) similar to how it's done in PettingZoo or Gym. I'm just getting started with multi-agent reinforcement learning and I'm not sure if I need separate representations for each agent. I hope using RGB mode will allow me to save the trained gifs and speed up the training process.

------------------ 原始邮件 ------------------ 发件人: "Michael @.>; 发送时间: 2024年2月21日(星期三) 晚上10:35 收件人: @.>; 抄送: @.>; "State @.>; 主题: Re: [michaelkoelle/marl-aquarium] render_mode (Issue #1)

目前,只实现了一种渲染模式:“人类”。我们可以很容易地实现屏幕的rgb_array表示。你能指定你的预期输出是什么吗?你们需要为每一个代理人单独代理吗?

- 直接回复这封邮件,在GitHub上查看,或取消订阅. 您收到此消息是因为您修改了打开/关闭状态。消息ID:<迈克尔科勒/海洋馆/问题/ 1 / @.***和>

michaelkoelle commented 6 months ago

I added the "rgb_array" render mode in #89c4ebb. If you update your version to v0.1.10, you should now be able to get the screen grab as rgb array using this code:

rgb_array = env.render()
print(rgb_array)
kudouxiao commented 6 months ago

Thank you!