Hot answers tagged ai
You should use raycasting to check for visibility. Each raycast is expensive, so stagger the visibility checks for different enemies (they don't all have to see the player on the same frame)
You should write a method that checks the visibility. It follows the definition: http://en.wikipedia.org/wiki/Visibility_%28geometry%29 There are a lot of techniques to do that. Therefore, I reccomend you searching on the web which approach would fit best in your problem.
Only top voted, non community-wiki answers of a minimum length are eligible