Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #95446
| From | Martin Schöön <martin.schoon@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: How to rearrange array using Python? |
| Date | 2015-08-17 21:14 +0000 |
| Organization | @ Home |
| Message-ID | <d3f15cF6mctU1@mid.individual.net> (permalink) |
| References | <d1vftgF65svU1@mid.individual.net> <mailman.1100.1438294883.3674.python-list@python.org> <1468455.P0rGZF1LBf@PointedEars.de> <d224qaFr1aeU1@mid.individual.net> |
Den 2015-07-31 skrev Martin Schöön <martin.schoon@gmail.com>: > Den 2015-07-31 skrev Thomas 'PointedEars' Lahn <PointedEars@web.de>: >> Mark Lawrence wrote: >>> >>> I'm not absolutely certain but I think you're into what's known as a >>> constraint satisfaction problem, in which case this >>> https://pypi.python.org/pypi/python-constraint/1.2 is as good a starting >>> point as any. If I'm wrong we'll soon get told :) >> >> It is a CSP indeed, and as I was reading the OP I was thinking of SWI- >> > Thanks guys, I will follow up on the CSP lead. It is not something I > have prior experience of so it will be interesting. > Brief progress report (just to tell you that your advice has been 'absorbed'). I have been reading a bit, here is one example. http://kti.ms.mff.cuni.cz/~bartak/constraints/index.html Interesting stuff but sometimes head-spinning -- I don't always follow the lingo. I have also downloaded and installed Python-Constraint. It works as advertised as long as I replicate the examples found at: http://labix.org/python-constraint I can even scale some of the examples. Creating my own examples has proven harder -- in part because the documentation is minimalistic but also because I have not tried very hard. We have, finally, got some nice summer weather here... I have tried my hand at a *very* basic room placement problem. It works apart from the fact that I have not figured out how to tell the solver there are limits to how many occupants each room can house. Yesterday I started on a basic Kenken example. I need to experiment a little to find a way to add the needed division and subtraction constraints. I haven't given this much thought yet. Today I found Numberjack: http://numberjack.ucc.ie/ It seems better documented than Python-Constraint but that is all I know. Anyone with experience of Numberjack? In summary: I am having fun using ipython and org-mode for emacs. I am not making much headway but then I don't have a dead-line :-) /Martin
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to rearrange array using Python? Martin Schöön <martin.schoon@gmail.com> - 2015-07-30 20:31 +0000
Re: How to rearrange array using Python? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-30 23:21 +0100
Re: How to rearrange array using Python? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-31 04:29 +0200
Re: How to rearrange array using Python? Martin Schöön <martin.schoon@gmail.com> - 2015-07-31 20:40 +0000
Re: How to rearrange array using Python? Martin Schöön <martin.schoon@gmail.com> - 2015-08-17 21:14 +0000
Re: How to rearrange array using Python? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-30 23:41 +0100
Re: How to rearrange array using Python? Robin Koch <robin.koch@t-online.de> - 2015-07-31 03:18 +0200
Re: How to rearrange array using Python? Martin Schöön <martin.schoon@gmail.com> - 2015-07-31 20:53 +0000
csiph-web