Code Monkey home page Code Monkey logo

Comments (3)

MarcCote avatar MarcCote commented on August 15, 2024 3

Never happened to me. Interesting how we are finding bugs in 40+ years' games :)!

The time-out is a good idea.

from jericho.

wu-qing-157 avatar wu-qing-157 commented on August 15, 2024 2

Thanks, I currently use a timeout to filter out the actions that will cause a hang.

from jericho.

mhauskn avatar mhauskn commented on August 15, 2024 1

Thank you for the bug report. After checking out an older version of Jericho (3.0.5) I can replicate the issue as described. Digging further, the get_valid_actions() call is getting stuck on the action "drop all down sack."

Examining the inventory before the hang:
"You are carrying:\n A bird's nest\n The bird's nest contains:\n A broken jewel-encrusted egg\n The broken jewel-encrusted egg contains:\n A brown sack\n\n"

So we have 3 containers: Nest > Egg > Sack and we're asking to put everything into the sack, including the nest and egg. Zork has trouble handling this type of container switching.

Other buggy behaviors starting from the "put sack in egg" state is to "put egg in sack" - in this case it doesn't hang but if you examine the inventory afterwards "You are carrying:\n A bird's nest" (the egg and sack have completely disappeared). Similarly if we "put nest in sack", the resulting state is 'You are empty-handed.'

It's hard to address the root of the issue, which would require better containership programming in Zork. But there might be a couple workarounds:

  • Implement a timeout on valid action search so as to prevent a full hang. (Maybe this isn't too hard if valid action search is already being performed in separate threads.)
  • Manually disallow actions that put containers inside of each other. Or equivalently write zork-specific post-step routines to flatten any stacked containers.

@MarcCote curious if you had encountered this issue as well?

from jericho.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.