MineDojo / Voyager

An Open-Ended Embodied Agent with Large Language Models
https://voyager.minedojo.org/
MIT License
5.4k stars 493 forks source link

Bot leaves and joins immediately. How do I give the bot commands, get the bot to stay? Is this an error? #47

Closed christianortel closed 1 year ago

christianortel commented 1 year ago

Hey everyone so I am able to do everything the tutorial asks and the bot joins successfully, it worked entirely.

HOWEVER, right after joining the bot leaves. I will be attaching my logs to my mineflayer, as well as minecraft and then a screenshot of the console output below! if anyone has any advice for what it may be the help is much appreciated!

Mineflayer - 20230530_111719.log Minecraft - 20230530_111719.log

Captureee

taoisu commented 1 year ago

Checkout your mineflayer log, the mineflayer-collectblock is not installed correctly.

Try deleting the node_modules/mineflayer-collectblock folder, re-install the local module

Cubey42 commented 1 year ago

I've been trying to re-install my local module, does this look like the install went correctly? (I added npm install typescript to resolve the "This is not the tsc command you are looking for")

PS H:\AI MC\Voyager\voyager\env\mineflayer> npm install -g npx C:\Users\Lucas\AppData\Roaming\npm\npx -> C:\Users\Lucas\AppData\Roaming\npm\node_modules\npx\index.js

removed 1 package and audited 294 packages in 0.669s

36 packages are looking for funding run npm fund for details

found 0 vulnerabilities

PS H:\AI MC\Voyager\voyager\env\mineflayer> cd mineflayer-collectblock PS H:\AI MC\Voyager\voyager\env\mineflayer\mineflayer-collectblock> npx tsc npx: installed 1 in 0.49s

            This is not the tsc command you are looking for

To get access to the TypeScript compiler, tsc, from the command line either:

PS H:\AI MC\Voyager\voyager\env\mineflayer\mineflayer-collectblock> npx tsc PS H:\AI MC\Voyager\voyager\env\mineflayer\mineflayer-collectblock> cd .. PS H:\AI MC\Voyager\voyager\env\mineflayer> npm install npm WARN voyager@1.0.0 No description npm WARN voyager@1.0.0 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1 package from 1 contributor and audited 294 packages in 0.753s

36 packages are looking for funding run npm fund for details

found 0 vulnerabilities

taoisu commented 1 year ago

Try this under H:\AI MC\Voyager\voyager\env\mineflayer\:

npm install ./mineflayer-collectblock

Verify the installation by checking the node_modules/mineflayer-collectblock and see if there is .js files there.

christianortel commented 1 year ago

I have successfully reinstalled the node modules and things seem to be somewhat working. However, the bot seems to keep leaving after each task. How exactly can I change the tasks and give control over my pc? seems i can control everything and nothing with searching for wood changes. I will be attaching my console and would love any advice i can get!

Mineflayer: 20230531_232300.log Minecraft: 20230531_232300.log

Terminal Logs:

(base) PS C:\Users\chris\Voyager> python voyager2.py Creating Minecraft server Using embedded DuckDB with persistence: data will be stored in: ckpt/curriculum/vectordb Using embedded DuckDB with persistence: data will be stored in: ckpt/skill/vectordb Starting Minecraft server Subprocess minecraft started with PID 22156. The mc server is listening on port 11920 Server started on port 11920 Mineflayer process has exited, restarting
Subprocess mineflayer started with PID 22960. Server started on port 3000

Starting task Mine 1 wood log for at most 4 times Stopping mineflayer Mineflayer process has exited, restarting Subprocess mineflayer started with PID 23216. Server started on port 3000

Render Action Agent system message with 0 control_primitives Action Agent human message Code from the last round: No code in the first round

Execution error: No error

Chat log: None

Biome: swamp

Time: sunrise

Nearby blocks: grass, vine, oak_leaves, oak_log

Nearby entities (nearest to farthest): chicken, turtle

Health: 20.0/20

Hunger: 20.0/20

Position: x=-5.5, y=69.0, z=26.5

Equipment: [None, None, None, None, None, None]

Inventory (0/36): Empty

Chests: None

Task: Mine 1 wood log

Context: You can mine one of oak, birch, spruce, jungle, acacia, dark oak, or mangrove logs.

Critique: None

Stopping mineflayer Mineflayer process has exited, restarting Subprocess mineflayer started with PID 19696. Server started on port 3000

Your last round rollout terminated due to error:

Failed to complete task Mine 1 wood log. Skipping to next task. Completed tasks: Failed tasks: Mine 1 wood log Starting task Mine 1 wood log for at most 4 times Stopping mineflayer Mineflayer process has exited, restarting Subprocess mineflayer started with PID 22484. Server started on port 3000 Render Action Agent system message with 0 control_primitives ****Action Agent human message**** Code from the last round: No code in the first round Execution error: No error Chat log: None Biome: swamp Time: sunrise Nearby blocks: grass, vine, oak_leaves, oak_log Nearby entities (nearest to farthest): chicken, turtle Health: 20.0/20 Hunger: 20.0/20 Position: x=-5.5, y=69.0, z=26.5 Equipment: [None, None, None, None, None, None] Inventory (0/36): Empty Chests: None jungle, acacia, dark oak, or mangrove logs. Critique: None Stopping mineflayer Mineflayer process has exited, restarting Subprocess mineflayer started with PID 5568. Server started on port 3000 Your last round rollout terminated due to error: Failed to complete task Mine 1 wood log. Skipping to next task. Completed tasks: Failed tasks: Mine 1 wood log, Mine 1 wood log Starting task Mine 1 wood log for at most 4 times Stopping mineflayer
go-maple commented 1 year ago

@christianortel Bro.Can you show me the python code? tell me chatgpt api version, gpt-3.5 or gpt-4?

christianortel commented 1 year ago

this is my main python file that im using to start minecraft. was it this file or another you ahd in mind? @go-maple

image

go-maple commented 1 year ago

@christianortel Bro,I'm so sorry so late to see this issue.my code like this: """ voyager = Voyager( azure_login=azure_login, openai_api_key=openai_api_key, env_wait_ticks=30,

resume=True

)

voyager.learn(reset_env=False) """

christianortel commented 1 year ago

@go-maple thank you, i think i may be confused on the app, so am i able to give the bot commands to execute in the game? or how does this work exactly? is it fully automated with no instructions? my apologies as im a newb to coding, but more a newb with minecraft modding lol

go-maple commented 1 year ago

me too. I have tested many times. I found most of time which throw this error.

image

Be careful about the error like "Connection aborted",restart again and again. It will work:), when I tested it at home. always throw this error.today I change the place to my wife office room(change the network).It works many iterations (12-15 iterations) never stop :), I don't know what's happened.

I want @swen128 help us, because I want know the method to save all of openai requests in openai_response.json file. It help us to understand how to communicate with openai GPT-4. I borrowed api token from my friend. I don't know the key can support me How long.

rngom commented 1 year ago

@christianortel I think you should first remove the screenshot above and revoke your API keys first

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.