A park ranger once said there is a severe overlap of the dumbest humans and the smartest bears.
Bears and most animals are quit genius. I've seen a horse belly crawl army style under barbed wire fencing. Couldn't figure out how she kept getting out, sat for 37 hours watching just her to figure out of she kept getting out.
Fencing was maybe 2 and a half foot from the ground and she was a 10 year old paint.