Managed to find a strategy pretty quickly: begin from the outside, opposite of the direction you want the cat to go in; then fill until you have 1 exit in that direction and begin to fill in the exits while the cat travels to the one open route, and when it's one step away you close it. You then have many more moves before the cat can get back to open area, in which case you can repeat until you have a closed loop.