Skip to content

luxo-ai/brain-vs-brawn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brain vs. Brawn

Inspired by Romeo Ardimento

♟️

Screen Shot 2023-08-17 at 10 42 48 PM

References

  1. https://humphryscomputing.com/Notes/AI/adversarial.search.html#:~:text=Adversarial%20search%20is%20search%20when,unpredictable

  2. https://www.javatpoint.com/ai-adversarial-search

  3. https://python.plainenglish.io/adversarial-search-tic-tac-toe-in-python-6061ed619712

  4. https://www.baeldung.com/cs/minimax-algorithm

function minimax(node, depth, alpha, beta, maximizingPlayer) is
if depth ==0 or node is a terminal node then
return static evaluation of node

if MaximizingPlayer then // for Maximizer Player
 maxEva= -infinity
 for each child of node do
 eva= minimax(child, depth-1, alpha, beta, False)
 maxEva= max(maxEva, eva)
 alpha= max(alpha, maxEva)
 if beta<=alpha
 break
 return maxEva

else // for Minimizer player
 minEva= +infinity
 for each child of node do
 eva= minimax(child, depth-1, alpha, beta, true)
 minEva= min(minEva, eva)
 beta= min(beta, eva)
 if beta<=alpha
 break
 return minEva

Releases

No releases published

Packages

No packages published