Experiments in building a constraint workbench.
Switch branches/tags
dynaproject-v0.1.330-alpha dynaproject-v0.1.327 dynaproject-v0.1.326 dynaproject-v0.1.325 dynaproject-v0.1.324 dynaproject-v0.1.323 dynaproject-v0.1.322 dynaproject-v0.1.321 dynaproject-v0.1.320 dynaproject-v0.1.319 dynaproject-v0.1.318 dynaproject-v0.1.317 dynaproject-v0.1.316 dynaproject-v0.1.315 dynaproject-v0.1.314 dynaproject-v0.1.313 dynaproject-v0.1.312 dynaproject-v0.1.311 dynaproject-v0.1.310 dynaproject-v0.1.309 dynaproject-v0.1.308 dynaproject-v0.1.307 dynaproject-v0.1.306 dynaproject-v0.1.305 dynaproject-v0.1.304 dynaproject-v0.1.303 dynaproject-v0.1.302 dynaproject-v0.1.301 dynaproject-v0.1.300 dynaproject-v0.1.299 dynaproject-v0.1.298 dynaproject-v0.1.297 dynaproject-v0.1.296 dynaproject-v0.1.295 dynaproject-v0.1.294 dynaproject-v0.1.293 dynaproject-v0.1.292 dynaproject-v0.1.291 dynaproject-v0.1.290 dynaproject-v0.1.289 dynaproject-v0.1.288 dynaproject-v0.1.287 dynaproject-v0.1.286 dynaproject-v0.1.285 dynaproject-v0.1.284 dynaproject-v0.1.283 dynaproject-v0.1.282 dynaproject-v0.1.281 dynaproject-v0.1.280 dynaproject-v0.1.279 dynaproject-v0.1.278 dynaproject-v0.1.277 dynaproject-v0.1.276 dynaproject-v0.1.275 dynaproject-v0.1.274 dynaproject-v0.1.273 dynaproject-v0.1.272 dynaproject-v0.1.271 dynaproject-v0.1.270 dynaproject-v0.1.269 dynaproject-v0.1.268 dynaproject-v0.1.267 dynaproject-v0.1.266 dynaproject-v0.1.265 dynaproject-v0.1.264 dynaproject-v0.1.263 dynaproject-v0.1.262 dynaproject-v0.1.261 dynaproject-v0.1.260 dynaproject-v0.1.259 dynaproject-v0.1.258 dynaproject-v0.1.257 dynaproject-v0.1.256 dynaproject-v0.1.255 dynaproject-v0.1.254 dynaproject-v0.1.253 dynaproject-v0.1.252 dynaproject-v0.1.251 dynaproject-v0.1.250 dynaproject-v0.1.249 dynaproject-v0.1.248 dynaproject-v0.1.247 dynaproject-v0.1.246 dynaproject-v0.1.245 dynaproject-v0.1.244 dynaproject-v0.1.243 dynaproject-v0.1.242 dynaproject-v0.1.241 dynaproject-v0.1.240 dynaproject-v0.1.239 dynaproject-v0.1.238 dynaproject-v0.1.237 dynaproject-v0.1.236 dynaproject-v0.1.235 dynaproject-v0.1.234 dynaproject-v0.1.233 dynaproject-v0.1.232 dynaproject-v0.1.231 dynaproject-v0.1.230 dynaproject-v0.1.229
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Constraint Capers Workbench.sln


Constraint Capers Workbench

A tool to explore how to model a constraint satisfaction problem with an engine for solving it and presenting a solution. Uses the Google or-tools for solving the problem.

The program idea is outlined in The strange case of the missing application. The Workbench is an attempt to build the missing application, to see if such a thing exists, or has any utility. In the past whenever I've tried to come up with a suitable interface I've always eventually come up with something a lot like a spreadsheet. Just goes to show just how good a paradigm the spreadsheet is.

Plainly a big barrier to any kind of constraint satisfaction project is going to be the fact that they are NP-hard problems. In other words, they tend to be very hard to solve quickly. I'm kind of working on the assumption that Moore's Law is going to rescue me. All of those hundreds or thousands of CPU cores we are supposed to be getting over the next decade or so should help. Quantum computers should help a lot too. So, I am just going to assume that, at some point in the future, the hardware will be there to solve even very complex constraint satisfaction problems in a reasonable amount of time.

Project manifesto

  • Technical level - the user of the software should require a technical level at or below that of an average spreadsheet user;
  • Build a playground - the user should have a constraint workbench in which they are able to model various types of constraint problems and then able to solve them in an interactive manner and present the results;
  • Solution display - should be configurable, taking a technical model and displaying the resulting solution in a manner that makes sense to the user;
  • No programming - absolutely no programming. There are plenty of development environments available, there is no need to build yet another one here;
  • Optimisation - The user should be able to optimise the solution interactively.

Current State

The image below is a picture of the model used to solve the n-queens problem produced by version 0.4. As you can see the application supports aggregate variables, expression and all different constraints and domains.

Workbench Displaying a Model

You can also create a solution. When I say a solution I don't mean just a set of values that represent one state that satisfies all of the constraints. I mean you can design how your solution is displayed in very rudimentary ways. Currently there are two ways of displaying a solution, a chess board and a table.

n-queens solution

The most egregious failing of the project manifesto to date is the breach of the no programming rule. There plainly is quite a lot of what looks suspiciously like programming in the various languages included in the project. The most obvious being the visualizer binding language. I have a few ideas how I can reduce the level of programming in the visualizer bindings but I doubt I can remove it altogether.

Please do not use this project for anything other than experimentation. I make no guarantees about backward compatibility or indeed anything else. The project is currently just a prototype. It may well never be anything beyond that.

Built With

  • C#
  • Google or-tools - CSP library amongst many other things
  • WPF
  • Caliburn Micro
  • Irony - used to build the parsers
  • NUnit - unit test framework



Constraint Capers Workbench is licensed under a BSD license.


Many thanks to Ashley Davies for writing NetworkView: A WPF custom control for visualizing and editing networks, graphs and flow-charts upon which the prototype of the model display is based.

Thanks also to David Hopkins for the edit icon used in the program. The original can be found here.