minerllabs / minerl

MineRL Competition for Sample Efficient Reinforcement Learning - Python Package
http://minerl.io/docs/
Other
685 stars 154 forks source link

ChatAction in v0.4.4 #752

Closed ayman-i closed 7 months ago

ayman-i commented 7 months ago

Hi, in my envspec file I have the imports: from minerl.herobraine.env_specs.navigate_specs import Navigate from minerl.herobraine.hero.handler import Handler import minerl.herobraine.hero.handlers as handlers from minerl.herobraine.hero.handlers.agent.actions.chat import ChatAction from typing import List

and added the function (to the environment class): def create_actionables(self) -> List[Handler]: return super().create_actionables() + [ # enable chat ChatAction() ]

but I am getting the following error: error

do you know how to fix this? Thank you in advance!

ayman-i commented 7 months ago

as an additional note, I have also tried writing handlers.ChatAction() and this also gave me the same result

ayman-i commented 7 months ago

Closed; I managed to fix this issue by adding the chat action to the wrapper

milesway commented 7 months ago

@ayman-i Hello, how do you manage to have it work? I am able to add the handler the world is able to load. However I am keep getting AttributeError: '_MultiAgentEnv' object has no attribute 'set_next_chat_message'

ayman-i commented 7 months ago

@milesway Hi, I'm not sure I'll be able to help too much as I didn't get that error myself, but I would suggest checking that your import statements and create_actionables function are correct. When I was trying to fix it myself I found in an issue that a recommendation was to change 'handlers.ChatAction()' to just 'ChatAction()' in the create_actionables() function so that may also be worth a try. If not I'd suggest opening an issue!