Elevator Instructions – Robofrog

  • Move to the nearest floor that an activated summon button is located on.
  • When stopping at a floor, open doors.
  • Close doors after 20 seconds of inactivity has passed, or the close button is activated.
  • If open button is activated while not moving, open doors.
  • If open button is activated while moving, do nothing.
  • After closing doors, if previously moving upwards resume moving in same direction as before stopping as long as there are still floors with activated floor buttons that need to be reached upwards.
  • After closing doors, if previously moving downwards resume moving in same direction as before stopping as long as there are still floors with activated floor buttons that need to be reached downwards.
  • Move to the floor that has its respective floor button activated.
  • When moving stop at any floor along the way that has an activated summon button that corresponds with the direction already moving in.
  • When moving stop at any floors along the way that has an activated floor button.

This entry was posted in Elevator Instructions, RoboFrog. Bookmark the permalink.

1 Response to Elevator Instructions – Robofrog

  1. davidbdale's avatar davidbdale says:

    There’s some very nice work here, RoboFrog.

    It’s mostly clear and mostly economical.

    I guess these two have to be taken together?

    • After closing doors, resume moving in same direction as before stopping as long as there are still floors with activated floor buttons that need to be reached in said direction.
    • Move to the floor that has its respective floor button activated.

    It’s hard to express that the elevator must respond to BOTH what you call Floor Buttons and Summon Buttons. An elevator traveling toward a Summons will react along the way to a Floor Button.

    It’s an open question whether an elevator would understand “said direction.” Yours would have to.

    I think the elevator doesn’t care about these two, unless you are putting the elevator in charge of deactivating the lights, which I guess you could do.

    • After closing doors, the activated summon button on that floor for the direction you are moving in is now deactivated.
    • After closing doors, the activated floor button for that floor is now deactivated.

    I will delay grading these assignments for awhile to give everyone a chance to revise their first drafts. DON’T POST A NEW VERSION. Just open this post in Edit and make improvements.

    Optional, of course.

Leave a reply to davidbdale Cancel reply