Experiments in building a constraint workbench.
Switch branches/tags
dynaproject-v0.1.189 dynaproject-v0.1.188 dynaproject-v0.1.187 dynaproject-v0.1.186 dynaproject-v0.1.185 dynaproject-v0.1.184 dynaproject-v0.1.183 dynaproject-v0.1.182 dynaproject-v0.1.180 dynaproject-v0.1.179 dynaproject-v0.1.178 dynaproject-v0.1.177 dynaproject-v0.1.176 dynaproject-v0.1.175 dynaproject-v0.1.174 dynaproject-v0.1.173 dynaproject-v0.1.172 dynaproject-v0.1.170 dynaproject-v0.1.169 dynaproject-v0.1.168 dynaproject-v0.1.167 dynaproject-v0.1.166 dynaproject-v0.1.165 dynaproject-v0.1.164 dynaproject-v0.1.163 dynaproject-v0.1.162 dynaproject-v0.1.161 dynaproject-v0.1.160 dynaproject-v0.1.159 dynaproject-v0.1.158 dynaproject-v0.1.157 dynaproject-v0.1.156 dynaproject-v0.1.155 dynaproject-v0.1.154 dynaproject-v0.1.153 dynaproject-v0.1.152 dynaproject-v0.1.151 dynaproject-v0.1.150 dynaproject-v0.1.149 dynaproject-v0.1.148 dynaproject-v0.1.147 dynaproject-v0.1.146 dynaproject-v0.1.145 dynaproject-v0.1.144 dynaproject-v0.1.143 dynaproject-v0.1.142 dynaproject-v0.1.141 dynaproject-v0.1.140 dynaproject-v0.1.139 dynaproject-v0.1.138 dynaproject-v0.1.137 dynaproject-v0.1.136 dynaproject-v0.1.135 dynaproject-v0.1.134 dynaproject-v0.1.133 dynaproject-v0.1.132 dynaproject-v0.1.131 dynaproject-v0.1.130 dynaproject-v0.1.129 dynaproject-v0.1.128 dynaproject-v0.1.127 dynaproject-v0.1.126 dynaproject-v0.1.125 dynaproject-v0.1.124 dynaproject-v0.1.123 dynaproject-v0.1.122 dynaproject-v0.1.121 dynaproject-v0.1.120 dynaproject-v0.1.119 dynaproject-v0.1.118 dynaproject-v0.1.117 dynaproject-v0.1.114 dynaproject-v0.1.113 dynaproject-v0.1.112 dynaproject-v0.1.111 dynaproject-v0.1.110 dynaproject-v0.1.109 dynaproject-v0.1.108 dynaproject-v0.1.107 dynaproject-v0.1.106 dynaproject-v0.1.105 dynaproject-v0.1.104 dynaproject-v0.1.103 dynaproject-v0.1.102 dynaproject-v0.1.101 dynaproject-v0.1.100 dynaproject-v0.1.99 dynaproject-v0.1.98 dynaproject-v0.1.97 dynaproject-v0.1.96 dynaproject-v0.1.95 dynaproject-v0.1.94 dynaproject-v0.1.93 dynaproject-v0.1.92 dynaproject-v0.1.91 dynaproject-v0.1.90 dynaproject-v0.1.89 dynaproject-v0.1.88 dynaproject-v0.1.87 dynaproject-v0.1.86
Nothing to show
Clone or download

README.md

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

Authors

License

Constraint Capers Workbench is licensed under a BSD license.

Acknowledgements

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.