Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSPjs

Simple library to do Constraint Satisfaction Problem

import { solve, enforceConstraint, Problem} from "cspjs"
import util from "util"

const variables = {
    "a": [1,2,3,4],
    "b": [1,2,3,4]
}

const problem : Problem = {
    variables,
    constraints: [
        {head:"a", tail:"b", predicate: (h,t)=>h+t===h*t}
    ]
}

const solutions = solve(problem)
const firstSol = solutions.next()

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages