Thoughts on AI. Will computers ever be intelligent? Really intelligent? Tasks that previously were thought to require intelligence: adding and subtracting playing chess driving a car recognizing speech or handwriting translating to a foreign language proving mathematical theorems
O(n), n=number of nodes expanded
O(d), d = depth of search
O(breadth of tree) = O(bd), b=branching factor
Write a smart kalah playing program!
int kalahboard::minimax(depth d): //semi-pseudocode
if [human won] return –infinity;
if [machine won] return +infinity;
if (d==0) return evaluate();
for (move=first; move<=last; move++)
kalahboard b=*this; //duplicate board
if (b.board[move]>0) //is move legal?
b.makemove(move); //make the move
v=b.minimax(d-1); //find its value
if (v<best) best=v; //remember if best
else // similarly for MACHINE’s move