2008/11/4 Jesper Eskilson <span dir="ltr"><<a href="mailto:jesper@eskilson.se">jesper@eskilson.se</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Fri, Oct 31, 2008 at 8:55 AM, Imre Palik <<a href="mailto:imre@u-tx.com">imre@u-tx.com</a>> wrote:<br>
> During playing with project Euler I solved a few constraint satisfaction problems with erlang. But whenever I code a solution, I have a really awkward feeling, that it should be possible to do better, but I don't know how.<br>
><br>
> I tend to code a backtracking search with constraint propagation before every step. I model the constraint graph with digraph, but then the non-functional nature of the digraph package makes backtracking really awkward.<br>
><br>
> Is there any better way to solve constraint satisfaction problems?<br>
> What is the rationale behind those pesky side effects in digraph?<br>
<br>
</div>If you want to solve Project Euler problems using constraints, I'd<br>
recommend using Prolog instead. GNU Prolog worked very nice for the<br>
problems I tried.<br>
<br>
Are there any good constraint libraries for Erlang?</blockquote><div><br>There are no constraint libraries that I know of. However, there is Erlog which is a prolog implemented in Erlang which works quite well. Depending on the application. As yet it has no built-in constraint handling but that could be added if a serious request comes along.<br>
<br>Robert<br><br></div></div>