tag: scala

Oct 21, 2016

Negamax in Scala

The Scala evaluation method makes it more efficient to use immutable values, but it still give us the chance to easily deal with mutable data. It is possible to write a program following the Functional Programming paradigm while being able to rely on mutable variables. Thanks to that, it is reasonably easy to implement the negamax with alpha beta pruning algorithm, improving the performance of an unbeatable computer in a Tic Tac Toe game.