Alpha-beta pruning is just minimax in a lattice of clamping functions

A lazy take on a classic game theory algorithm. Sip a caffè latte while thinking about lattices Haskell extensions and imports used in this post {-# LANGUAGE DataKinds, DeriveGeneric, DeriveTraversable, DerivingStrategies, GeneralizedNewtypeDeriving, RankNTypes, ScopedTypeVariables, StandaloneDeriving, TypeFamilies #-} import Data.Ord ( Down ( Down , getDown )) import Data.List.NonEmpty ( NonEmpty…