summaryrefslogtreecommitdiff
path: root/src/world/agent.js
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2023-11-10 11:24:56 -0600
committersanine <sanine.not@pm.me>2023-11-10 11:24:56 -0600
commit428062dccb362627b4251945632c75d9db8f93f7 (patch)
tree27d50a332414ccd105997827102ff0a59403f58e /src/world/agent.js
parent1b92f501c40eded57d66946ff717e49a5362f7c3 (diff)
refactor senses to use world instead of lattice only
Diffstat (limited to 'src/world/agent.js')
-rw-r--r--src/world/agent.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/world/agent.js b/src/world/agent.js
index d91481b..576ebc4 100644
--- a/src/world/agent.js
+++ b/src/world/agent.js
@@ -4,8 +4,8 @@ import { sense_read } from './sense.js';
import { proposal_merge } from './proposal.js';
-export function agent_decide(lattice, agent, senses, actions) {
- const inputs = senses.map(s => sense_read(lattice, agent, s)).flat();
+export function agent_decide(world, agent, senses, actions) {
+ const inputs = senses.map(s => sense_read(world, agent, s)).flat();
const [result, state] = agent.net.compute(inputs, agent.state);
const new_agent = { ...agent, state };