Baby Language Steps
- Wait until the Summon Button lights up, and Go to the designated floor, Stop, and Open the door
- Upon reaching to the First Respondent, Open the door, and keep them Open for 10 seconds then Close the door
- If an obstacle is in the way of the door upon closing, keep them Open until the area is clear of all obstacle, then proceed to Close the door. Refresh the previous command if the command of Door Close or Door Open has lit
- Head either Up or Down from the First Respondent depending on the current position of the floor:
- If First Respondent is Up or Down, Proceed to stay on route in numerical order until reaching to the highest point or to the lowest point of the floor
- If First Respondent is Up or Down, Stop at the designated floor that is Above or Below the current floor in numerical order if the number is either Greater or Less Than the current floor
- If Second Respondent lights up:
- Only head to the Second Response if and only if the direction of the First Respondent matches the same direction of either Up or Down
- If the command is Up, Don’t proceed to go to the Second Respondent if the current number on the First Respondent is Greater Than the Second Respondent
- If the command is Down, Don’t proceed to go to the Second Respondent if the current number on the First Respondent is Less Than the Second Respondent
- After fulfilling the Response or Summon Button, Repeat the following steps until further notice
I like the looks of this very much, GamersPet.
My first observation, though, is to suggest that the Elevator never needs to be told to Wait. If its last command, for example, is to Close the doors after 10 seconds of inactivity, it will close the doors and . . . wait, by which I mean do nothing. If it’s told to return to the ground floor, or to home base, following ten seconds of inactivity unless it has other commands to follow, it will return to the ground floor and . . . wait. Without being told to wait. Waiting is the condition that naturally occurs.
Well . . . I think I beat that one to death! 🙂
I guess THE Summon Button means any Summon Button and that the designated floor is the floor on which the Summon Button has been pressed.
I think the Elevator is the Respondent. The person who pressed the Summon Button first might be the First Request(er), but . . .
. . . But the Elevator doesn’t necessarily go to floors in the order Summons Buttons were pressed. It goes to the nearest Summons that’s headed in the same direction it’s committed to.
10 seconds is a very long time in the Elevator world.
You mean “while closing” not “upon closing,” which would mean that it had already finished closing.
There’s no IF condition to “Up or Down.” Every Request is “Up or Down.” What you mean is something like “If the First Request is UP, and you are traveling UP, . . . ”
OR something like, “If you are traveling UP when more than one UP request is made, proceed to the nearest request in the Up direction.”
See what I’m getting at?
You don’t need to do better work than this, GamersPet, but you might want to do so out of personal motivation. I will certainly regrade you higher if you make improvements, but most students would be satisfied with the grade you’ve already earned.
(Personally, I hope you can’t let this version rest.)
(Furthermore, you’ve left plenty of potential Instructions un-addressed. I will keep working with you for as long as you stay committed to the project.)