3 ms·
A fuzzy LOS algorithm may work: have a "vision" value, when the LOS algorithm encounters an "object", add the objects opaqueness to the vision, if the vision is
by dkersten 16y ago
A fuzzy LOS algorithm may work: have a "vision" value, when the LOS algorithm encounters an "object", add the objects opaqueness to the vision, if the vision is below a threshold, continue the ray, otherwise stop. Any objects of interest it calculates are made "fuzzy" based on its vision value. Also increase the vision value with distance, darkness, fog etc. That way, partially obscured, distant or dark objects have a higher vision value and are therefore treated as fuzzy, meaning the AI has only partial information on it (depending on how fuzzy).
Now distant and obscured objects are visible to the AI, but it won't know everything about them and could choose to ignore them, investigate or take some other intelligent action.