Skip to content

Commit ee20b9b

Browse files
authored
Merge pull request #37 from articuno12/master
Modification in alpha-beta search , bfs,online dfs and mini max search #26 #27 #28 #3
2 parents 976ed6c + 6544f91 commit ee20b9b

4 files changed

+6
-6
lines changed

md/Alpha-Beta-Search.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ __function__ MAX\-VALUE(_state_, _α_, _β_) __returns__ _a utility val
1010
 __if__ TERMINAL\-TEST(_state_) __the return__ UTILITY(_state_)
1111
 _v_ ← −∞
1212
 __for each__ _a_ __in__ ACTIONS(_state_) __do__
13-
   _v_ ← MAX(_v_, MIN\-VALUE(RESULT(_s_, _a_), _α_, _β_))
13+
   _v_ ← MAX(_v_, MIN\-VALUE(RESULT(_state_, _a_), _α_, _β_))
1414
   __if__ _v_ ≥ _β_ __then return__ _v_
1515
   _α_ ← MAX(_α_, _v_)
1616
 __return__ _v_
@@ -20,7 +20,7 @@ __function__ MIN\-VALUE(_state_, _α_, _β_) __returns__ _a utility val
2020
 __if__ TERMINAL\-TEST(_state_) __the return__ UTILITY(_state_)
2121
 _v_ ← +∞
2222
 __for each__ _a_ __in__ ACTIONS(_state_) __do__
23-
   _v_ ← MIN(_v_, MAX\-VALUE(RESULT(_s_, _a_), _α_, _β_))
23+
   _v_ ← MIN(_v_, MAX\-VALUE(RESULT(_state_, _a_), _α_, _β_))
2424
   __if__ _v_ ≤ _α_ __then return__ _v_
2525
   _β_ ← MIN(_β_ _v_)
2626
 __return__ _v_

md/Breadth-First-Search.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## AIMA3e
44
__function__ BREADTH-FIRST-SEARCH(_problem_) __returns__ a solution, or failure
5-
 _node_ ← a node with STATE = _problem_.INITIAL\-STATE, PATH\-COST = 0
5+
 _node_ ← a node with STATE = _problem_.INITIAL\-STATE
66
 __if__ _problem_.GOAL\-TEST(_node_.STATE) __then return__ SOLUTION(_node_)
77
 _frontier_ ← a FIFO queue with _node_ as the only element
88
 _explored_ ← an empty set

md/Minimax-Decision.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ __function__ MAX\-VALUE(_state_) __returns__ _a utility value_
99
 __if__ TERMINAL\-TEST(_state_) __the return__ UTILITY(_state_)
1010
 _v_ ← −∞
1111
 __for each__ _a_ __in__ ACTIONS(_state_) __do__
12-
   _v_ ← MAX(_v_, MIN\-VALUE(RESULT(_s_, _a_)))
12+
   _v_ ← MAX(_v_, MIN\-VALUE(RESULT(_state_, _a_)))
1313
 __return__ _v_
1414

1515
---
1616
__function__ MIN\-VALUE(_state_) __returns__ _a utility value_
1717
 __if__ TERMINAL\-TEST(_state_) __the return__ UTILITY(_state_)
1818
 _v_ ← ∞
1919
 __for each__ _a_ __in__ ACTIONS(_state_) __do__
20-
   _v_ ← MIN(_v_, MAX\-VALUE(RESULT(_s_, _a_)))
20+
   _v_ ← MIN(_v_, MAX\-VALUE(RESULT(_state_, _a_)))
2121
 __return__ _v_
2222

2323
---

md/Online-DFS-Agent.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ __function__ ONLINE-DFS-AGENT(_s'_) __returns__ an action
1010

1111
 __if__ GOAL\-TEST(_s'_) __then return__ _stop_
1212
 __if__ _s'_ is a new state (not in _untried_) __then__ _untried_\[_s'_\] ← ACTIONS(_s'_)
13-
 __if__ _s_ is not null __then__
13+
 __if__ _s_ is not null and _s'_ != _result_\[_s_, _a_\] __then__
1414
   _result_\[_s_, _a_\] ← _s'_
1515
   add _s_ to front of _unbacktracked_\[_s'_\]
1616
 __if__ _untried_\[_s'_\] is empty __then__

0 commit comments

Comments
 (0)