I say goose, because she's figured out how to undo the pasture gate latch and how to to use her beak/bill to manipulate the fancy "lock" I had on the tub that held the poultry feed in it. Whenever she figures out how to open something I need to put a different kind of latch or lock on it, but she always figures it out eventually. Then it needs to be replaced again.
It's a mixture of observation and trial and error with her, I think. She's very smart. You can "see" her thinking when she stares at things and works on them. She watches people opening and closing things. Once I had two locks and a rope holding the gate shut. Guess what? She figured it out, undid all of it and got into the grass before it had grown back enough. Not only that, she somehow held the gate open long enough that a bunch of ducks could get in and get everything all muddy (the gate is on a hill and normally swings shut in seconds, so I don't know how she stopped it from doing this, I'm guessing she used herself to prop it open). Now I just keep a chair or wheelbarrow propped against it so its too heavy for her to push open. Locks don't do any good!
The funny thing is, she's perfectly capable of flying over the fence. She won't do that because she wants the ducks to accompany her. If a human is in her pasture she might fly in, but if she's by herself she won't.
My goats are the smartest animals I own. They know when you aren't watching them so they go to or do whatever you least want them to do. They know exactly when it is time to feed them and where the feed is and how to get to it.