Fish aren't dumb at all.
We had a betta, in a bowl on top of our tank, because he was beating up my moor goldfish. And that fish jumped OUT of the bowl, wiggled across the mesh over the tank, and slipped in a 3 inch gap to get back in with the other fish!!
Btw, Andri Pogo, you're welcome!