Example agent program rules
Do send-warning(E,M) <= in(Loc,entity:curloc(E)) &
in(E’,entity:hostiles()) &
in(Loc’,entity:curloc(E’)) &
in(D,geo:dist(Loc,Loc’)) &
=(M,file:create(E’,Loc’,D)).
Do log(E,M,T) <= Do send-warning(E,M) &
Send a warning to entity E if there is a hostile entity within 25 distance units of it.
If a warning is sent and logging is not forbidden, then send a log message now.
Web Accessibility