#11379: Add Quantumino solver to sage/games
---------------------------+------------------------------------------------
   Reporter:  slabbe       |          Owner:  slabbe         
       Type:  enhancement  |         Status:  needs_review   
   Priority:  major        |      Milestone:  sage-4.7.1     
  Component:  misc         |       Keywords:  sd31           
Work_issues:               |       Upstream:  N/A            
   Reviewer:  Rob Beezer   |         Author:  Sébastien Labbé
     Merged:               |   Dependencies:                 
---------------------------+------------------------------------------------

Comment(by slabbe):

 Replying to [comment:23 slabbe]:
 > Although, I can not say that the proposed solution is perfect and always
 better than the precedent one.

 I change the way to show 2d polyomino. First, I reverted its drawing as it
 was before. Second, I added a boundary line. Thirdly, I made the edge
 between adjacent points smaller than before. This way, holes are more
 esthetic and natural : we accept them more easily.

 You can see the result with this example :

 {{{
 #!python
 sage: from sage.combinat.tiling import Polyomino, TilingSolver
 sage: L = []
 sage:
 L.append(Polyomino([(0,0),(0,1),(0,2),(0,3),(1,0),(1,1),(1,2),(1,3)],
 'yellow'))
 sage: L.append(Polyomino([(0,0),(0,1),(0,2),(0,3),(1,0),(1,1),(1,2)],
 "black"))
 sage: L.append(Polyomino([(0,0),(0,1),(0,2),(0,3),(1,0),(1,1),(1,3)],
 "gray"))
 sage: L.append(Polyomino([(0,0),(0,1),(0,2),(0,3),(1,0),(1,3)],"cyan"))
 sage: L.append(Polyomino([(0,0),(0,1),(0,2),(0,3),(1,0),(1,1)],"red"))
 sage: L.append(Polyomino([(0,0),(0,1),(0,2),(0,3),(1,1),(1,2)],"blue"))
 sage: L.append(Polyomino([(0,0),(0,1),(0,2),(0,3),(1,1),(1,3)],"green"))
 sage: L.append(Polyomino([(0,1),(0,2),(0,3),(1,0),(1,1),(1,3)],"magenta"))
 sage: L.append(Polyomino([(0,1),(0,2),(0,3),(1,0),(1,1),(1,2)],"orange"))
 sage: L.append(Polyomino([(0,0),(0,1),(0,2),(1,0),(1,1),(1,2)],"pink"))
 sage: T = TilingSolver(L, (8,8), reflection=True)
 sage: solution = T.solve().next()
 sage: G = sum([piece.show2d() for piece in solution], Graphics())
 sage: G.show(aspect_ratio=1, axes=False)
 }}}

 Or this animation :

 {{{
 #!python
 sage: a = T.animate()      #45 seconds
 sage: a
 Animation with 328 frames
 sage: a.show()      # take some time like 2 minutes
 }}}

 Now, I am happy with the patch. Needs review!

 Sébastien

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11379#comment:28>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to