Skip to content

Commit 6f21610

Browse files
authored
Merge pull request #16 from anurag-rai/satplan
Add SATPlan markdown
2 parents 0ca74f2 + 55781b1 commit 6f21610

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ The file [aima3e-algorithms.pdf](https://github.com/aimacode/pseudocode/blob/mas
175175
<td align="center"></td>
176176
<td><a href="md/Hybrid-Wumpus-Agent.md">HYBRID-WUMPUS-AGENT</a></td>
177177
</tr>
178+
<tr>
179+
<td align="center">&bull;</td>
180+
<td align="center"></td>
181+
<td><a href="md/SATPlan.md">SATPLAN</a></td>
182+
</tr>
178183
<tr>
179184
<td align="center">&bull;</td>
180185
<td align="center"></td>

md/SATPlan.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# SATPLAN
2+
3+
## AIMA3e
4+
__function__ SATPLAN(_init_, _transition_, _goal_, _T_<sub>max</sub>) __returns__ solution or failure
5+
&emsp;__inputs__: _init_, _transition_, _goal_, constitute a description of the problem
6+
&emsp;&emsp;&emsp;&emsp;_T_<sub>max</sub>, an upper limit for plan length
7+
8+
&emsp;__for__ _t_ = 0 to _T_<sub>max</sub> __do__
9+
&emsp;&emsp;&emsp;_cnf_ &larr; TRANSLATE-TO-SAT(_init_, _transition_, _goal_, _t_)
10+
&emsp;&emsp;&emsp;_model_ &larr; SAT-SOLVER(_cnf_)
11+
&emsp;&emsp;&emsp;__if__ _model_ is not null __then__
12+
&emsp;&emsp;&emsp;&emsp;&emsp;__return__ EXTRACT-SOLUTION(_model_)
13+
&emsp;__return__ _failure_
14+
15+
---
16+
__Figure__ ?? The SATPlan algorithm. The planning problem is translated into a CNF sentence in which the goal is asserted to hold at a fixed time step _t_ and axioms are included for each time step up to _t_. If the satisfiability algorithm finds a model, then a plan is extracted by looking at those proposition symbols that refer to actions and are assigned _true_ in the model. If no model exists, then the process is repeated with the goal moved one step later.

0 commit comments

Comments
 (0)