csp alternatives and similar packages
Based on the "AI" category.
Alternatively, view csp alternatives based on common mentions on social networks and blogs.
-
tensor-safe
A Haskell framework to define valid deep learning models and export them to other frameworks like TensorFlow JS or Keras. -
moo
Genetic algorithm library for Haskell. Binary and continuous (real-coded) GAs. Binary GAs: binary and Gray encoding; point mutation; one-point, two-point, and uniform crossover. Continuous GAs: Gaussian mutation; BLX-α, UNDX, and SBX crossover. Selection operators: roulette, tournament, and stochastic universal sampling (SUS); with optional niching, ranking, and scaling. Replacement strategies: generational with elitism and steady state. Constrained optimization: random constrained initialization, death penalty, constrained selection without a penalty function. Multi-objective optimization: NSGA-II and constrained NSGA-II. -
HaVSA
HaVSA (Have-Saa) is a Haskell implementation of the Version Space Algebra Machine Learning technique described by Tessa Lau. -
Etage
A general data-flow framework featuring nondeterminism, laziness and neurological pseudo-terminology.
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of csp or a related project?
Popular Comparisons
README
CSP
This package is available via
Hackage where its documentation resides. It
provides a solver for constraint satisfaction problems by implementing
a CSP
monad. Currently it only implements arc consistency but other
kinds of constraints will be added.
Below is a Sudoku solver, project Euler problem 96.
import Data.List
import Control.Monad.CSP
mapAllPairsM_ :: Monad m => (a -> a -> m b) -> [a] -> m ()
mapAllPairsM_ f [] = return ()
mapAllPairsM_ f (_:[]) = return ()
mapAllPairsM_ f (a:l) = mapM_ (f a) l >> mapAllPairsM_ f l
solveSudoku :: (Enum a, Eq a, Num a) => [[a]] -> [[a]]
solveSudoku puzzle = oneCSPSolution $ do
dvs <- mapM (mapM (\a -> mkDV $ if a == 0 then [1 .. 9] else [a])) puzzle
mapM_ assertRowConstraints dvs
mapM_ assertRowConstraints $ transpose dvs
sequence_ [assertSquareConstraints dvs x y | x <- [0,3,6], y <- [0,3,6]]
return dvs
where assertRowConstraints = mapAllPairsM_ (constraint2 (/=))
assertSquareConstraints dvs i j =
mapAllPairsM_ (constraint2 (/=)) [(dvs !! x) !! y | x <- [i..i+2], y <- [j..j+2]]
sudoku3 = [[0,0,0,0,0,0,9,0,7],
[0,0,0,4,2,0,1,8,0],
[0,0,0,7,0,5,0,2,6],
[1,0,0,9,0,4,0,0,0],
[0,5,0,0,0,0,0,4,0],
[0,0,0,5,0,7,0,0,9],
[9,2,0,1,0,8,0,0,0],
[0,3,4,0,5,9,0,0,0],
[5,0,7,0,0,0,0,0,0]]
solveSudoku sudoku3
Future
- Allow a randomized execution order for CSPs
- CSPs don't need to use IO internally. ST is enough.
- Constraint synthesis. Already facilitated by the fact that constraints are internally nondeterministic
- Other constraint types for CSPs, right now only AC is implemented
- n-ary heterogeneous constraints