Motivated by the results of behavioral studies performed on bees over the last two decades, we have attempted to decipher the logics behind the bee's autopilot, with specific reference to their use of optic flow (OF). Using computer-simulation experiments, we developed a vision-based autopilot that enables a 'simulated bee' to travel along a tunnel by controlling both its speed and its clearance from the walls, the ground, and the ceiling. The flying agent is fully actuated and can translate along three directions: surge, sway, and heave. The visuo-motor control system, called ALIS (AutopiLot using an Insect based vision System), is a dual OF regulator consisting of intertwined feedback loops, each of which has its own OF set-point. The experiments show that the simulated bee navigates safely along a straight or tapered tunnel and reacts sensibly to major OF perturbations caused, e.g., by the lack of texture on one wall or by the presence of a tapered tunnel. The agent is equipped with a minimalistic visual system (comprised of only eight pixels) that suffices to control the clearance from the four walls and the forward speed jointly, without the need to measure any speeds and distances. The OF sensors and the simple visuo-motor control system developed here are suitable for use on MAVs with avionic payloads as small as a few grams. Besides, the ALIS autopilot accounts remarkably for the quantitative results of ethological experiments performed on honeybees flying freely in straight or tapered corridors.