From c6614798075e5c772798d2fc2471e4d9cab39075 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Tue, 19 Apr 2016 12:05:58 +0200 Subject: [PATCH] add move variables --- report2/implementation.tex | 70 +++++++++----------------------------- 1 file changed, 17 insertions(+), 53 deletions(-) diff --git a/report2/implementation.tex b/report2/implementation.tex index bb00db8..9657891 100644 --- a/report2/implementation.tex +++ b/report2/implementation.tex @@ -23,59 +23,23 @@ This means that the encoding of a screen takes $3*|F|$ variables. \subsection{Transition encoding} We introduce a variable denoting the intended direction of movement $m \in -\{\text{up}, \text{down}, \text{left}, \text{right}\}$. Tiles -% -%Let\\ -%$\delta_{x}(x,m) = -% \begin{cases} -% (x+1) & \quad \text{if } m = left\\ -% (x-1) & \quad \text{if } m = right\\ -% x & \quad \text{otherwise} -% \end{cases}$\quad -%$\delta'_{x}(x,m) = -% \begin{cases} -% (x-1) & \quad \text{if } m = left\\ -% (x+1) & \quad \text{if } m = right\\ -% x & \quad \text{otherwise} -% \end{cases}$\\ -%$\delta_{y}(y,m) = -% \begin{cases} -% (y+1) & \quad \text{if } m = up\\ -% (y-1) & \quad \text{if } m = down\\ -% y & \quad \text{otherwise} -% \end{cases}$\quad -%$\delta'_{y}(y,m) = -% \begin{cases} -% (y-1) & \quad \text{if } m = up\\ -% (y+1) & \quad \text{if } m = down\\ -% y & \quad \text{otherwise} -% \end{cases}$\\ -% $\gamma_{x}(x,m) = -% \begin{cases} -% (x+2) & \quad \text{if } m = left\\ -% (x-2) & \quad \text{if } m = right\\ -% x & \quad \text{otherwise} -% \end{cases}$\quad -% $\gamma_{y}(y,m) = -% \begin{cases} -% (y+2) & \quad \text{if } m = up\\ -% (y-2) & \quad \text{if } m = down\\ -% y & \quad \text{otherwise} -% \end{cases}$ -% -%% " x" <+ x <+ "_" <+ y <+ " = BoxOnTarget & (x" <+ (checkX p x) <+ "_" <+ (checkY p x (y+1)) <+ " = Agent | x" -%% <+ (checkX p x) <+ "_" <+ (checkY p x (y+1)) <+ " = AgentOnTarget) & (x" <+ (checkX p x) <+ "_" <+ (checkY p x (y-1)) <+ " = Free | x" <+ (checkX p x) <+ "_" <+ (checkY p x (y-1)) <+ " = Target) & move = Left: AgentOnTarget;", -%% " x" <+ x <+ "_" <+ y <+ " = BoxOnTarget & (x" <+ (checkX p (x+1)) <+ "_" <+ (checkY p (x+1) y) <+ " = Agent | x" -%% <+ (checkX p (x+1)) <+ "_" <+ (checkY p (x+1) y) <+ " = AgentOnTarget) & (x" <+ (checkX p (x-1)) <+ "_" <+ (checkY p (x-1) y) <+ " = Free | x" <+ (checkX p (x-1)) <+ "_" -%% <+ (checkY p (x-1) y) <+ " = Target) & move = Up: AgentOnTarget;", -%% " x" <+ x <+ "_" <+ y <+ " = BoxOnTarget & (x" <+ (checkX p x) <+ "_" <+ (checkY p x (y-1)) <+ " = Agent | x" -%% <+ (checkX p x) <+ "_" <+ (checkY p x (y-1)) <+ " = AgentOnTarget) & (x" <+ (checkX p x) <+ "_" <+ (checkY p x (y+1)) <+ " = Free | x" <+ x <+ "_" <+ (checkY p x (y+1)) <+ " = Target) & move = Right : AgentOnTarget;", -%% " x" <+ x <+ "_" <+ y <+ " = BoxOnTarget & (x" <+ (checkX p (x-1)) <+ "_" <+ (checkY p (x-1) y) <+ " = Agent | x" -%% <+ (checkX p (x-1)) <+ "_" <+ (checkY p (x-1) y) <+ " = AgentOnTarget) & (x" <+ (checkX p (x+1)) <+ "_" <+ (checkY p (x+1) y) <+ " = Free | x" <+ (checkX p (x+1)) <+ "_" -%% <+ (checkY p (x+1) y) <+ " = Target) & move = Down : AgentOnTarget;", -% -% -% +\{\text{up}, \text{down}, \text{left}, \text{right}\}$. Per move we define a +$\delta$ and $\gamma$ variable which represent the change in coordinate value +respectively for the next position and the position next to the next postition. +\\ +$\delta_{(x,y)}(m)=\begin{cases} + (x-1, y) & \text{if } m = left\\ + (x+1, y) & \text{if } m = right\\ + (x, y+1) & \text{if } m = down\\ + (x, y-1) & \text{if } m = up\\ +\end{cases}\quad +\gamma{(x,y)}(m)=\begin{cases} + (x-2, y) & \text{if } m = left\\ + (x+2, y) & \text{if } m = right\\ + (x, y+2) & \text{if } m = down\\ + (x, y-2) & \text{if } m = up\\ +\end{cases} $ + %We define the tile update function $next(x_{i,j}), x_{i,j} \in F, \forall i,j \text{ s.t.} x_{i,j} \neq \perp$ as\\ %$ %next(x_{i,j}) = -- 2.20.1