Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

player moves out of plane #58

Open
musliner opened this issue Mar 18, 2022 · 2 comments
Open

player moves out of plane #58

musliner opened this issue Mar 18, 2022 · 2 comments

Comments

@musliner
Copy link

Our new viz tool happily reveals that, in this game, the player planted sapling and when it teleported away to a floating item it suddenly was on level 18 instead of 17. This probably makes subsequent things fail. In this particular case it seems like we actually teleported away in the middle of waiting for the next sapling to grow, and that confused our agent... perhaps something tasty appeared due to pogoist actions... but in any case, I think leaving the plane is probably bad, right?

logs avail on request. see player pos in snippets below.

musliner@openmind0:~/openmind/code/test/results/pal-tournament-v2-nonov-2022-03-16-165751-openmind0/openmind-in-polycraft-v2-domains-tournament-2022-03-16-165903-61a565947e51

[2022-03-16 17:17:01] prsinterface[1052771] main: [PCW] b'{"blockInFront":{"name":"minecraft:air"},"inventory":{"1":{"item":"minecraft:log","count":1,"damage":0,"maxdamage":0,"axis":"y","variant":"oak"},"7":{"item":"minecraft:iron_pickaxe","count":1,"damage":0,"maxdamage":250},"selectedItem":{"slot":0,"item":"","count":0,"damage":0,"maxdamage":0}},"player":{"pos":[49,17,69],"facing":"EAST","yaw":270.0,"pitch":0.0},"destinationPos":[0,0,0], ....

[2022-03-16 17:17:01] prsinterface[1052955] main: [OPRS] TP_TO 116 0

[2022-03-16 17:17:01] prsinterface[1053017] main: [PCW] b'{"goal":{"goalType":"ITEM","goalAchieved":false,"Distribution":"Uninformed"},"command_result":{"command":"TP_TO","argument":"116 0","result":"SUCCESS","message":"","stepCost":182.40189},"step":57,"gameOver":false}\n'

[2022-03-16 17:17:02] prsinterface[1053668] main: [PCW] b'{"actorActions":[{"preWorldState":{"blockInFront":{"name":"minecraft:air"},"inventory":{"1":{"item":"minecraft:log","count":2,"damage":0,"maxdamage":0,"axis":"y","variant":"oak"},"7":{"item":"minecraft:iron_pickaxe","count":1,"damage":0,"maxdamage":250},"selectedItem":{"slot":0,"item":"","count":0,"damage":0,"maxdamage":0}},"player":{"pos":[51,18,69],"facing":"EAST","yaw":270.0,"pitch":0.0},

@StephenGss
Copy link
Owner

This happens because of how Minecraft spawns in items after breaking a block. They pop into existence with an upward momentum and a random horizontal momentum.

Can you tell if the item was just in the air when you did your sense and teleport? or was it on top of another block?

I will do some testing to figure out the best way to fix this

@musliner
Copy link
Author

musliner commented Mar 21, 2022

it looks like the plastic_chest and the item 116 log are in almost same location... (correction, I had said same but 51/50 are diff first coordinates....)

[2022-03-16 17:17:01] prsinterface[1052865] send_message: Sending to openmind: (domain-fact (name "51,17,69" polycraft.plastic_chest))^M
...
[2022-03-16 17:17:01] prsinterface[1052869] send_message: Sending to openmind: (domain-fact (entityname "50,17,69" item.tile.log.oak))^M
[2022-03-16 17:17:01] prsinterface[1052869] send_message: Sending to openmind: (domain-fact (id "50,17,69" 116))^M
[2022-03-16 17:17:01] prsinterface[1052869] send_message: Sending to openmind: (domain-fact (item "50,17,69" minecraft.log))^M

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants