Skip to main content

What am I doing wrong?



  • Yumiko- kun

    nice script btw

  • Ryan Barrett

    Try that. Placing is independent of the agent.

  • Alan Downes

    That's really useful and has opened my eyes to commands I'd not used before, thank you so much for your reply Ryan. This seems much more robust than the first code I tried, however, I still don't see a reason why the initial code shouldn't have worked, and it certainly shouldn't deliver different results when it's ran. The only tweak I made to the suggested code is to have him side step to the left when he's in his last block place, so that he's back over the first block and added a number of loops to ensure that the walls build higher and higher. Attached code if anyone else wants to replicate. Also attached an image of the result with a very happy looking agent. Would've placed the last block but I ended the code as it was getting too high!

  • Lou Holloway

    Hello. How far have your students gotten with this project?

    I am starting a new group, one hour a week. I had much the same idea. And encountered much the same problem. So I am looking for a chance to workshop my ideas before the kids get too far into my lesson sequence..

    I want students to do a coding tutorial (I thought that the 'hour of code' started well, and I have checked out a couple of the 'coding' worlds in the library), and then use the agent in survival mode to collect resources and build a city.

    I thought the focus would be 'engineering' roughly based in the D&T and C&CT curricula (Aus. Curric, as I am in the NT, although I found the Victorian equivalent better set out last I checked). So students would be making 'blueprints':

    And then coding the Agent to build them. This is my third blueprint- it needed to be simpler and more iterative than I had imagined. After much debugging:

    (I built these layers from the bottom up- you can sort of see the progression)

    I made some code that can set up one layer almost according to plan (I have been using 'place block down' rather than 'place on move'). 

    My next problem is making it work in survival, with limited blocks in the Agent.

    I built this by repeatedly entering the code for a single layer. With another code, I am moving items about in the Agent inventory so that it can repeat. You can see where different blocks have run out. After two layers I have to manually reload the agent.

    I need to know what the limits of the Agent are in survival mode- it seems to be able to manifest new blocks using some commands, which kind of ruins the supply and demand dynamic I had imagined.

    I also need to find a meta-command so that the agent can initiate new sub-programs. I'm sure this is possible in python, but can I do it using the minecraft blocks?



Please sign in to leave a comment.