[CT421]: Notes

This commit is contained in:
2025-02-02 11:24:25 +00:00
parent 7a944ca736
commit 5cfe0a42a3
2 changed files with 7 additions and 7 deletions

View File

@ -155,22 +155,22 @@ The problem statement can be formalised as follows:
More formally: More formally:
\begin{itemize} \begin{itemize}
\item Set of states $S$. \item There is a set of (possible/legal) states $S$;
\item Start state $s_0 \in S$. \item There is some start state $s_0 \in S$;
\item Set of actions $A$ and action rules $a(s) \rightarrow s'$. \item There is a set of actions $A$ and action rules $a(s) \rightarrow s'$;
\item A goal test $g(s) \rightarrow \{0,1\}$. \item There is some goal test $g(s) \rightarrow \{0,1\}$ that tests if we have satisfied our goal;
\item Cost function $C(s,a,s') \rightarrow \mathbb{R}$. \item There is some cost function $C(s,a,s') \rightarrow \mathbb{R}$ that associates a cost with each action;
\item Search can be defined by the 5-tuple $(S,s,a,g,C)$. \item Search can be defined by the 5-tuple $(S,s,a,g,C)$.
\end{itemize} \end{itemize}
We can then state the problem as follows: We can then state the problem as follows:
find a sequence of actions $a_1 \dots a_n$ and corresponding states $s_0 \dots sn$ such that: find a sequence of actions $a_1 \dots a_n$ and corresponding states $s_0 \dots s_n$ such that:
\begin{itemize} \begin{itemize}
\item $s_0 = s$ \item $s_0 = s$
\item $s_i = a_i(S_{i-1})$ \item $s_i = a_i(S_{i-1})$
\item $g(s_n) = 1$ \item $g(s_n) = 1$
\end{itemize} \end{itemize}
while minimising $\sum^n_{i=1} c(a_i)$. while minimising the overall cost $\sum^n_{i=1} c(a_i)$.
\\\\ \\\\
The problem of solving a sudoku puzzle can be re-stated as: The problem of solving a sudoku puzzle can be re-stated as:
\begin{itemize} \begin{itemize}