From: Mart Lubbers Date: Wed, 20 Apr 2016 17:31:59 +0000 (+0200) Subject: transitions formalized X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=666bb0db458df801f433de1b3f3a79921e8bc263;p=mc1516pa.git transitions formalized --- diff --git a/report2/implementation.tex b/report2/implementation.tex index 32a5bd7..9cfcbac 100644 --- a/report2/implementation.tex +++ b/report2/implementation.tex @@ -39,14 +39,32 @@ $$\delta_{(x,y)}(m)=\begin{cases} (x, y-2) & \text{if } m = up\\ \end{cases}$$ -We define the tile update function $next(i)$ for $i \in F$. -$$next(i)=\left\{\begin{array}{lll} - free & \text{if } & i=agent \wedge \delta(i)=free\\ - & \vee & i = agent \wedge \delta(i)=target\\ - target & \text{if } & i=targetagent \wedge \delta(i)=free\\ - & \vee & i = targetagent \wedge \delta(i)=target\\ - agent & \text{if } & i=free \wedge \delta(i)=agent\\ - & \vee & i = free \wedge \delta(i)=targetagent\\ - targetagent & \text{if } & i=target \wedge \delta(i)=agent\\ - & \vee & i = target \wedge \delta(i)=targetagent\\ +We define the tile update function $next(i_1, i_2, i_3)$ where $i_1$ contains +the agent and $i_2$ and $i_3$ are adjacent to it in some direction. +$$next(i_1, i_2, i_3)=\left\{\begin{array}{lll} +% Three state transitions + (free, agent, box) & \text{if } & + i_1=agent \wedge i_2=box \wedge i_3=free\\ + (target, agent, box) & \text{if } & + i_1=targetagent \wedge i_2=box \wedge i_3=free\\ + (free, targetagent, box) & \text{if } & + i_1=agent \wedge i_2=targetbox \wedge i_3=free\\ + (free, agent, targetbox) & \text{if } & + i_1=agent \wedge i_2=box \wedge i_3=targetbox\\ + (target, targetagent, box) & \text{if } & + i_1=targetagent \wedge i_2=targetbox \wedge i_3=free\\ + (target, agent, targetbox) & \text{if } & + i_1=targetagent \wedge i_2=box \wedge i_3=target\\ + (free, targetagent, targetbox) & \text{if } & + i_1=agent \wedge i_2=targetbox \wedge i_3=target\\ + (target, targetagent, targetbox) & \text{if } & + i_1=targetagent \wedge i_2=targetbox \wedge i_3=target\\ +% Two state transitions + (free, agent, i_3) & \text{if } & i_1=agent \wedge i_2=free\\ + (free, targetagent, i_3) & \text{if } & i_1=agent \wedge i_2=target\\ + (target, agent, i_3) & \text{if } & i_1=targetagent \wedge i_2=free\\ + (target, targetagent, i_3) & \text{if } & i_1=targetagent \wedge i_2=target\\ +% One state transitions + (agent, i_2, i_3) & \text{if } & i_1=agent\\ + (targetagent, i_2, i_3) & \text{if } & i_1=targetagent\\ \end{array}\right.$$