From 5c6485a51a5d7aea8fa0ab424ea79318a9af9c50 Mon Sep 17 00:00:00 2001 From: Lenovo Date: Sat, 1 Jun 2024 22:11:49 +0800 Subject: [PATCH] 昕闻画出了两个2048游戏图 --- main/2048isAcyclic.tex | 24 ++++++++++++++++++++---- pic/2048merge1.tex | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ pic/2048merge1.tikz | 54 ------------------------------------------------------ pic/2048merge2.tex | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ pic/2048merge2.tikz | 53 ----------------------------------------------------- 5 files changed, 127 insertions(+), 111 deletions(-) create mode 100644 pic/2048merge1.tex delete mode 100644 pic/2048merge1.tikz create mode 100644 pic/2048merge2.tex delete mode 100644 pic/2048merge2.tikz diff --git a/main/2048isAcyclic.tex b/main/2048isAcyclic.tex index 5fe35db..a3d8677 100644 --- a/main/2048isAcyclic.tex +++ b/main/2048isAcyclic.tex @@ -77,12 +77,28 @@ For all possible board, For any transition $\langle B_1, a, B_1', B_2\rangle$ in the 2048 game, we have $sum(B_1)=sum(B_1')$ regardless of whether at least two tiles merge. -\highlight{需要昕闻画2048的状态迁移图,同一个状态包括两种后续情况, -一种是发生合并,一种是没发生合并的} - - Due to a new generated 2-tile or 4-tile in board $B_2$, $sum(B_2)>sum(B_1')$, that is $sum(B_2)>sum(B_1)$. +Figure \ref{2048merge1} and Figure \ref{2048merge2} show transition +examples with and without a merge. + +\begin{figure}[ht] + \begin{center} + \include{pic/2048merge1} + \caption{2048 transition example with a merge, where $sum(B_1)=sum(B_1')=46$, + $sum(B_2)=48>sum(B_1')$.} + \label{2048merge1} + \end{center} +\end{figure} +\begin{figure}[ht] + \begin{center} + \include{pic/2048merge2} + \caption{2048 transition example without a merge, where $sum(B_1)=sum(B_1')=62$, + $sum(B_2)=64>sum(B_1')$.} + \label{2048merge2} + \end{center} +\end{figure} + Based on (\ref{size}) and (\ref{utility}), we have $u(B_2)>u(B_1)$. diff --git a/pic/2048merge1.tex b/pic/2048merge1.tex new file mode 100644 index 0000000..721a006 --- /dev/null +++ b/pic/2048merge1.tex @@ -0,0 +1,54 @@ +\begin{tikzpicture}[scale=0.5,transform shape] + % Draw the grid + \foreach \i in {0,...,3} { + \foreach \j in {0,...,3} { + \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); + } + } + + % Draw the tiles with numbers + \foreach \i/\j/\n/\color in {0/0/2/20, 1/1/4/40, 2/2/8/60, 3/3/16/80, 2/3/16/80} { + \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); + \node at (\i+0.5,\j+0.5) {\textbf{\n}}; + } + + \begin{scope}[xshift=6cm] + \foreach \i in {0,...,3} { + \foreach \j in {0,...,3} { + \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); + } + } + + % Draw the tiles with numbers + \foreach \i/\j/\n\color in {3/0/2/20, 3/1/4/40, 3/2/8/60, 3/3/32/100} { + \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); + \node at (\i+0.5,\j+0.5) {\textbf{\n}}; + } + \end{scope} + + \begin{scope}[xshift=12cm] + \foreach \i in {0,...,3} { + \foreach \j in {0,...,3} { + \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); + } + } + + % Draw the tiles with numbers + \foreach \i/\j/\n/\color in {3/0/2/20, 3/1/4/40, 3/2/8/60, 3/3/32/100,1/0/2/20} { + \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); + \node at (\i+0.5,\j+0.5) {\textbf{\n}}; + } + \end{scope} + + \draw[thick, black,->] (2,4) -- (2,5) -- (8,5) -- (8,4) ; + \draw[thick, black,->] (8,0) -- (8,-1) -- (14,-1) -- (14,0) ; + + \node at (5,4.5) {$a=$\textit{right}, $r=32$}; + \node at (11.5,-0.5) {random tile}; + + \node at (-0.5,2) {$B_1=$}; + \node at (5.5,2) {$B_1^{'} =$}; + \node at (11.5,2) {$B_2=$}; + +\end{tikzpicture} + diff --git a/pic/2048merge1.tikz b/pic/2048merge1.tikz deleted file mode 100644 index cebd9a6..0000000 --- a/pic/2048merge1.tikz +++ /dev/null @@ -1,54 +0,0 @@ -\begin{tikzpicture}[scale=0.75,transform shape] - % Draw the grid - \foreach \i in {0,...,3} { - \foreach \j in {0,...,3} { - \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); - } - } - - % Draw the tiles with numbers - \foreach \i/\j/\n/\color in {0/0/2/20, 1/1/4/40, 2/2/8/60, 3/3/16/80, 2/3/16/80} { - \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); - \node at (\i+0.5,\j+0.5) {\textbf{\n}}; - } - - \begin{scope}[xshift=6cm] - \foreach \i in {0,...,3} { - \foreach \j in {0,...,3} { - \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); - } - } - - % Draw the tiles with numbers - \foreach \i/\j/\n\color in {3/0/2/20, 3/1/4/40, 3/2/8/60, 3/3/32/100} { - \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); - \node at (\i+0.5,\j+0.5) {\textbf{\n}}; - } - \end{scope} - - \begin{scope}[xshift=12cm] - \foreach \i in {0,...,3} { - \foreach \j in {0,...,3} { - \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); - } - } - - % Draw the tiles with numbers - \foreach \i/\j/\n/\color in {3/0/2/20, 3/1/4/40, 3/2/8/60, 3/3/32/100,1/0/2/20} { - \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); - \node at (\i+0.5,\j+0.5) {\textbf{\n}}; - } - \end{scope} - - \draw[thick, black,->] (2,4) -- (2,5) -- (8,5) -- (8,4) ; - \draw[thick, black,->] (8,0) -- (8,-1) -- (14,-1) -- (14,0) ; - - \node at (5,4.5) {$r=32$}; - \node at (11.5,-0.5) {random tile}; - - \node at (-0.5,2) {$B_1=$}; - \node at (5.5,2) {$B_1^{'} =$}; - \node at (11.5,2) {$B_2=$}; - -\end{tikzpicture} - diff --git a/pic/2048merge2.tex b/pic/2048merge2.tex new file mode 100644 index 0000000..cb917d4 --- /dev/null +++ b/pic/2048merge2.tex @@ -0,0 +1,53 @@ +\begin{tikzpicture}[scale=0.5,transform shape] + % Draw the grid + \foreach \i in {0,...,3} { + \foreach \j in {0,...,3} { + \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); + } + } + + % Draw the tiles with numbers + \foreach \i/\j/\n/\color in {0/0/2/20, 1/1/4/40, 2/2/8/60, 2/3/16/80, 3/3/32/100} { + \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); + \node at (\i+0.5,\j+0.5) {\textbf{\n}}; + } + + \begin{scope}[xshift=6cm] + \foreach \i in {0,...,3} { + \foreach \j in {0,...,3} { + \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); + } + } + + % Draw the tiles with numbers + \foreach \i/\j/\n\color in {3/0/2/20, 3/1/4/40, 3/2/8/60, 2/3/16/80,3/3/32/100} { + \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); + \node at (\i+0.5,\j+0.5) {\textbf{\n}}; + } + \end{scope} + + \begin{scope}[xshift=12cm] + \foreach \i in {0,...,3} { + \foreach \j in {0,...,3} { + \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); + } + } + + % Draw the tiles with numbers + \foreach \i/\j/\n/\color in {3/0/2/20, 3/1/4/40, 3/2/8/60, 3/3/32/100,1/0/2/20,2/3/16/80} { + \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); + \node at (\i+0.5,\j+0.5) {\textbf{\n}}; + } + \end{scope} + + \draw[thick, black,->] (2,4) -- (2,5) -- (8,5) -- (8,4) ; + \draw[thick, black,->] (8,0) -- (8,-1) -- (14,-1) -- (14,0) ; + + \node at (5,4.5) {$a=$\textit{right}, $r=0$}; + \node at (11.5,-0.5) {random tile}; + + \node at (-0.5,2) {$B_1=$}; + \node at (5.5,2) {$B_1^{'} =$}; + \node at (11.5,2) {$B_2=$}; + +\end{tikzpicture} \ No newline at end of file diff --git a/pic/2048merge2.tikz b/pic/2048merge2.tikz deleted file mode 100644 index a978a77..0000000 --- a/pic/2048merge2.tikz +++ /dev/null @@ -1,53 +0,0 @@ -\begin{tikzpicture}[scale=0.75,transform shape] - % Draw the grid - \foreach \i in {0,...,3} { - \foreach \j in {0,...,3} { - \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); - } - } - - % Draw the tiles with numbers - \foreach \i/\j/\n/\color in {0/0/2/20, 1/1/4/40, 2/2/8/60, 2/3/16/80, 3/3/32/100} { - \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); - \node at (\i+0.5,\j+0.5) {\textbf{\n}}; - } - - \begin{scope}[xshift=6cm] - \foreach \i in {0,...,3} { - \foreach \j in {0,...,3} { - \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); - } - } - - % Draw the tiles with numbers - \foreach \i/\j/\n\color in {3/0/2/20, 3/1/4/40, 3/2/8/60, 2/3/16/80,3/3/32/100} { - \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); - \node at (\i+0.5,\j+0.5) {\textbf{\n}}; - } - \end{scope} - - \begin{scope}[xshift=12cm] - \foreach \i in {0,...,3} { - \foreach \j in {0,...,3} { - \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); - } - } - - % Draw the tiles with numbers - \foreach \i/\j/\n/\color in {3/0/2/20, 3/1/4/40, 3/2/8/60, 3/3/32/100,1/0/2/20,2/3/16/80} { - \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); - \node at (\i+0.5,\j+0.5) {\textbf{\n}}; - } - \end{scope} - - \draw[thick, black,->] (2,4) -- (2,5) -- (8,5) -- (8,4) ; - \draw[thick, black,->] (8,0) -- (8,-1) -- (14,-1) -- (14,0) ; - - \node at (5,4.5) {$r=0$}; - \node at (11.5,-0.5) {random tile}; - - \node at (-0.5,2) {$B_1=$}; - \node at (5.5,2) {$B_1^{'} =$}; - \node at (11.5,2) {$B_2=$}; - -\end{tikzpicture} \ No newline at end of file -- libgit2 0.26.0