Even the humble slime mould (Physarum polycephalum) can navigate mazes to find a food source, using the most optimal (least expenditure of energy) path. Slime moulds have been used to create maps of major metropolitan transportation systems (such as the Tokyo subway system). Likewise, Darwin's famous experiments with earthworms revealed that earthworms use what the environment affords them in order to strengthen their burrows. They accomplish this despite lacking a central nervous system and any of the "big five" sensory organs. Finally, there are parallels between the pattern dynamics of the BZ (Belousov–Zhabotinsky) reaction and the aggregation phase of the slime mould life cycle (in which a chemical signal for starvation pulls distinct amoebas into an aggregate, and each amoeba that sends the starvation signal becomes the center of a circle towards which the other amoebas move).
Examples like suggest that many complex systems, both biological and otherwise, can demonstrate intelligent behavior. The social, cultural, political, biological, and other environmental contexts afford and constrain the kind of intelligence an organism has. Brains, especially human ones, aren't particularly special in this regard.