0 a soldier who guards a place, usually by standing at its entrance: --
1 a soldier who guards a place and prevents those who are not allowed in from entering: --
A short (dashed-line) path is observed by one of the sentries.
The final visibility cost at a cell would be the sum of all visibility costs calculated for each of its observing sentries.
Different applications would have different visibility risk factors that should be taken into account, other than simply being/not being observed by a sentry.
Only the cells that are in the view field of the discovered sentry are updated in the visibility map.
It's in the middle of their line, like a sentry standing guard.
The shortest path on the other hand is exposed to all sentries.
The approach depends on estimating a cost value at each free-space location that presents the risk of being seen by any sentry.
The estimated value at any location represents the risk level of being exposed to one or more sentries.