Skip to content

Commit

Permalink
Merge pull request #37 from articuno12/master
Browse files Browse the repository at this point in the history
Modification in alpha-beta search , bfs,online dfs and mini max search #26  #27 #28 #3
  • Loading branch information
norvig committed Mar 3, 2017
2 parents 976ed6c + 6544f91 commit ee20b9b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions md/Alpha-Beta-Search.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ __function__ MAX\-VALUE(_state_, _α_, _β_) __returns__ _a utility val
 __if__ TERMINAL\-TEST(_state_) __the return__ UTILITY(_state_)
 _v_ ← −∞
 __for each__ _a_ __in__ ACTIONS(_state_) __do__
   _v_ ← MAX(_v_, MIN\-VALUE(RESULT(_s_, _a_), _α_, _β_))
   _v_ ← MAX(_v_, MIN\-VALUE(RESULT(_state_, _a_), _α_, _β_))
   __if__ _v_ ≥ _β_ __then return__ _v_
   _α_ ← MAX(_α_, _v_)
 __return__ _v_
Expand All @@ -20,7 +20,7 @@ __function__ MIN\-VALUE(_state_, _α_, _β_) __returns__ _a utility val
 __if__ TERMINAL\-TEST(_state_) __the return__ UTILITY(_state_)
 _v_ ← +∞
 __for each__ _a_ __in__ ACTIONS(_state_) __do__
   _v_ ← MIN(_v_, MAX\-VALUE(RESULT(_s_, _a_), _α_, _β_))
   _v_ ← MIN(_v_, MAX\-VALUE(RESULT(_state_, _a_), _α_, _β_))
   __if__ _v_ ≤ _α_ __then return__ _v_
   _β_ ← MIN(_β_ _v_)
 __return__ _v_
Expand Down
2 changes: 1 addition & 1 deletion md/Breadth-First-Search.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## AIMA3e
__function__ BREADTH-FIRST-SEARCH(_problem_) __returns__ a solution, or failure
 _node_ ← a node with STATE = _problem_.INITIAL\-STATE, PATH\-COST = 0
 _node_ ← a node with STATE = _problem_.INITIAL\-STATE
 __if__ _problem_.GOAL\-TEST(_node_.STATE) __then return__ SOLUTION(_node_)
 _frontier_ ← a FIFO queue with _node_ as the only element
 _explored_ ← an empty set
Expand Down
4 changes: 2 additions & 2 deletions md/Minimax-Decision.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ __function__ MAX\-VALUE(_state_) __returns__ _a utility value_
 __if__ TERMINAL\-TEST(_state_) __the return__ UTILITY(_state_)
 _v_ ← −∞
 __for each__ _a_ __in__ ACTIONS(_state_) __do__
   _v_ ← MAX(_v_, MIN\-VALUE(RESULT(_s_, _a_)))
   _v_ ← MAX(_v_, MIN\-VALUE(RESULT(_state_, _a_)))
 __return__ _v_

---
__function__ MIN\-VALUE(_state_) __returns__ _a utility value_
 __if__ TERMINAL\-TEST(_state_) __the return__ UTILITY(_state_)
 _v_ ← ∞
 __for each__ _a_ __in__ ACTIONS(_state_) __do__
   _v_ ← MIN(_v_, MAX\-VALUE(RESULT(_s_, _a_)))
   _v_ ← MIN(_v_, MAX\-VALUE(RESULT(_state_, _a_)))
 __return__ _v_

---
Expand Down
2 changes: 1 addition & 1 deletion md/Online-DFS-Agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ __function__ ONLINE-DFS-AGENT(_s'_) __returns__ an action

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

0 comments on commit ee20b9b

Please sign in to comment.