World's most popular travel blog for travel bloggers.

[Solved]: Where is the recursion, in the minimax-decision algorithm?

, , No Comments
Problem Detail: 

The below is from an article titled:

Minimax: Recursive Implementation

enter image description here

To be a recursive function, you need to call yourself.

  • What part of this pseudo code is calling itself?
  • How does depth-first effect the recursion process?
  • There seems to be a return in every line of minimax-value, shouldn't the return be only on a terminal case?
  • Will value[op] contain the moves in order from the root node?
  • What does Apply(op,game) do the very first time through?

Any pointers are greatly appreciated.

Asked By : Greg McNulty

Answered By : D.W.

Inside the function Minimax-Value, see the line where it says "the highest Minimax-Value of..."? That is implicitly a recursive call to the Minimax-Value function, i.e., a call to yourself.

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/21710

0 comments:

Post a Comment

Let us know your responses and feedback