Re: Is Prolog a good language for generating semi-random, constrained solutions?
Daniel Lyons <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
Kaitain Jones writes: > I suppose the key problem is that PL spends too much time (through > backtracking) tinkering at the edges of many solutions that are miles away > from being useful. It can't fail early enough without an approach like > yours, but if you use that approach it ends up being too prescriptive and > skews the results. I found my mind drifting towards genetic algorithms at > one point. It seems to me any time you use a generate/test paradigm, much of the effort is finding where to draw the line between the two tasks. If the backtracking seems expensive, it really means your generator is not smart enough—but this is what makes the improved version seem too "prescriptive." My experience with all programming, not just functional and declarative, programming has been that the cure for inefficiency is often unbeautiful, although this was more true for me with FP and LP when I was less experienced. A genetic solution under any scheme will certainly be more code and even less beautiful. I'm not sure how fair it is to hold Prolog hardly be held accountable for shortcomings that would be as true, if not more true, with all other options. -- Daniel Lyons _______________________________________________ SWI-Prolog mailing list [email protected] https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog