Skip to content

import "marlo" can not be resolved #83

@irfanfarhat

Description

@irfanfarhat

Hey!
I followed Anaconda's installation and installed Marlo. I ran the single-agent example and it worked. Now (after one day) I pasted the multi-agent example and I am getting import "marlo" could not be resolved.
I am not sure what is the issue please help me as soon as possible. I am new to this and I have a research project to start working on and I am short on time. I have a warning that says cannot find gcc in c_cpp_properties.json and I don't know if it is related to this.
currently I am installing mingw and see if it fixes the issues. If it does fix the issue I will close this issue and will let you know. But if it doesn't please help me what can I do to fix this import "marlo" could not be resolved.

image

This is the multi-agent example code

`# !/usr/bin/env python

$MALMO_MINECRAFT_ROOT/launchClient.sh -port 10000

$MALMO_MINECRAFT_ROOT/launchClient.sh -port 10001

import marlo
client_pool = [('127.0.0.1', 10000),('127.0.0.1', 10001)]
join_tokens = marlo.make('MarLo-MazeRunner-v0',
params={
"client_pool": client_pool,
"agent_names" :
[
"MarLo-Agent-0",
"MarLo-Agent-1"
]
})

As this is a two-agent scenario,

there will just two join tokens

assert len(join_tokens) == 2

@marlo.threaded
def run_agent(join_token):
env = marlo.init(join_token)
observation = env.reset()
done = False
count = 0
while not done:
_action = env.action_space.sample()
obs, reward, done, info = env.step(_action)
print("reward:", reward)
print("done:", done)
print("info", info)
env.close()

Run agent-0

thread_handler_0, _ = run_agent(join_tokens[0])

Run agent-1

thread_handler_1, _ = run_agent(join_tokens[1])

Wait for both the threads to complete execution

thread_handler_0.join()
thread_handler_1.join()

print("Episode Run Complete")`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions