Tuesday, March 28, 2023

Robot Odyssey: Control center


An ominous security camera greets you as you enter the Robotropolis control center. Every room in this level has one. Their purpose soon becomes apparent, as a computer room on the other side of the complex lets you view all of them, including places you can't get to yet.


How pleasantly orthogonal! But there's also a sub-area that neither fits well in the overall map nor obeys grid lines; a maze of ventilation shafts connecting the library and the north chamber.


The center of the complex is the MCC, and four buttons accessed through other rooms in each of the quadrants - the ventilation shafts, the force field tunnel, the high voltage room, and a minefield. A floppy disk in the main office, read in the computer room, confirms that the goal of this level is to deactivate the MCC by pressing the four buttons, and other floppy disks give hints on how to accomplish this:

  • A disk near the library's venting duct says that "counting chips" can be used to select air tubes.
  • A disk in the map anteroom says, as you may have surmised, that the map room walls correspond to the mines in the minefield. Furthermore, only robots may enter the minefield. Robot communication will be needed here.
  • A disk in the force field tunnel says that you use robot relays to pass keys along, and to plan ahead for the return.

Apart from the disks, the only items found here are two more chips, one in the trash dump, one in the the lobby of the elevator room, which closes as I approach it. A magnet outline here indicates I could hold the doors open with my magnet, and getting a robot to drop it there would be trivial, but I'm pretty sure the game wants me to solve this floor's challenges first.

As for the challenges, the minefield fills me with dread. Clearly the intent is to have one robot solve the maproom maze, and use the antennae to control a second one in the minefield, but there are two major problems - how do I communicate direction with an antennae that can only be turned on and off (oh boy, real-world computer engineering problems!) and how do I account for lag, so that the minefield robot doesn't walk right into the mine that corresponds to a wall that the controller bot bumped into? And after that, do I need to get the minefield bot out?

The ventilation shaft maze looks easier though still non-trivial, especially if I need to get the robot out once he's pressed the button in the MCC. Some trial and error may be needed - there's a fan which I assume will apply leftward velocity to the robot in its path, but I don't know by how much.

The force field tunnel's puzzle isn't yet apparent, but a tunnel bypass tells me that once solved, returning won't be a problem. But the high voltage room looks simple, and more importantly, contains a crystal-charging station. So I go to that one first.

I can't go in here, but my robots can, and I can view the action through the computer room terminal and see that a button-like object moves around randomly. I can't think of a great way to go about catching it intelligently - my button sensor from level 3 isn't calibrated to that particular shape, but pinbot logic gets it eventually.

Hitting the button disables the safety barrier, letting me enter and hit the first switch in the MCC.

Next challenge - the force field tunnel.

The key unlocks the lower tunnel, but only when it's in the right lock. We need to get it to the left side of the tunnel by having robots carry it across the colored force fields, which block you and robots matching their color. Sparky, being painted red, is no use here, since the outer force fields will block him; we need Checkers to carry the key to the middle, drop it, and have Scanner pick it up and deliver it the rest of the way. But then we'll need a way of bringing the key back to the right-side lock so we can leave.

My design plan for Checkers - have him bounce back and forth between the rooms. Force shields don't trigger bumpers, so instead I placed a crystal in the left-side room and used a crystal sensor as the trigger to go right.

The grabber will be toggled on and off by this sensor as well, so that he'll leave it behind, head right, and be able to return and grab it. A useful chip design here, loadable from the disk, will be the RS flipflop, which can act as a one-input, two-output toggleswitch and will save me some effort in wiring up the standard two-input latch-style flipflops to do the same.

Initial tests found it let go of the key too soon, so I added an array of OR gates to delay the release/return.

Not perfect, but maybe good enough?

I take Scanner to the other side, and wire him to go right until he grabs the key, and come back.

Good enough!

I retrieve the key, unlock the door to the MCC, and hit the second switch here. Now I'm stranded on the left side of the tunnels, but I can get back by rewiring Scanner to relay the key to the center, where Checkers is already programmed to fetch it and bring it back to the lock. This part's a bit tricky, since Scanner has no way of knowing when he's reached the center, but there's a way; grabbing the key triggers a long OR-gate delay chain, after which he lets go of the key and reverses direction.

The minefield and ventilation shafts are next, and I did the ventilation shafts. Robots can enter, you can't, as per usual. The fan is just for show, which uncomplicates things a bit, but the method of counting pipes to enter the correct one suggested by the computer was proving difficult - the count-to-N chip has a lag, and adding more conditional logic (e.g. "go down if you're in state 2 or state 5, advance states if you're in state 1 and bottom bumper is low, or if you're not in state 1 and bottom bumper is high) slows things down so much that the robot completely passes a junction before it decides what direction to take.

But then I realized that there's an easier way. A path through the maze that only requires changing directions twice, both of them in corners, where it doesn't matter if it takes the logic gates a long time to make a decision.

I designed my circuit to do this incrementally, first to travel diagonally up-right, then added the ability to sense being stuck in the upper-right corner and advance to a "go south" state, tested it, and added the ability to sense being stuck in the lower-right corner and advance to a "go southwest" state. When I tested it, the robot made it to the north chamber and MCC, but missed the button, so I added once last state so that it could reverse itself in the MCC and hit the button.

The final design's a bit cluttered, but I expected much worse.

The logic is actually fairly simple:

  • Hitting any top-right, bottom-right, or bottom-left corner advances the state.
  • State 0: "Go up and right."
  • State 1: "Stop going up and right. Go down, and lock it in."
  • State 2: "Go left." (don't stop going down)
  • State 3: "Go right." (left motion stops, down motion doesn't)
  • State 4: "Nothing." (right motion stops, down motion doesn't)



All that's left now is the minefield. Hope I can get Checkers back once that part is solved!

No comments:

Post a Comment

Most popular posts