@Jeruba I think that with each species, their senses, experience of locations and situations, and the ways they relate to those, are all different, but I think it is clear that spiders and insects do all have some kind of understanding of space, terrain, and situations, and they have different states and different intentions at different times, and that definitely includes the ability to use their senses to try to understand their environment, and then make choices based on that information to respond to that situation to serve their needs.
When I was a kid, I used to spend hours and hours putting insects (mostly ants) in (very often rather inhumane) different perilous situations and carefully watching what they did. They have a very strong ability to discover and explore their new situation, and respond appropriately.
Ants can react to shadows, and are more likely to if they’ve recently been alerted that something may be stalking them. Almost all insects seem to have varying levels of alertness and perception of danger that an animal is after them, even if they don’t see very well. Wasps have a better visual command of space, and different escalation levels of their attacks to drive animals away from their nests and food.
I think with the especially evasive spiders, they can definitely see me at a distance and have a good understanding both of the building layout within at least 20 feet, and also show the fairly advanced tactic of running to get out of sight and then going a different direction and waiting, and then moving quickly again if the animal comes back into sight. I think it is vision-based, but these ones are definitely aware of where they can go to find hiding places and escape into walls or behind/under furniture. And they rush to hide as soon as they see a human (though mainly if humans move, not if you’re sitting motionless). But most spiders don’t do anything like that and seem to mostly ignore humans unless you touch them or come very close, or touch their webs.