emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

5x5 Arithmetic solver


From: Vincent Belaïche
Subject: 5x5 Arithmetic solver
Date: Thu, 19 May 2011 22:21:53 +0200

Dear Dave,

Please find herein attached a contribution to the 5x5 game. This is an
arithmetic solver based on a matrix inversion in a (Z/2Z)^25 vector
space.

Note that will work only with a reasonably recent version of Calc
because that needs a bug fix on matrix inversion for matrix of Z/2Z
modulo forms.

The code works only for 5x5 grid size for the time being. I think that
it is feasible to make it general to work for any size or for any
pattern (I had in mind like replacing the 5-toggles cross by some other
pattern like a V or Y or X pattern). However this would need some
further thinking.

Also, this contribution could be improved in several other minor aspects
like:

- showing only one or a limited number of click positions for suggestion
  instead of all of them --- that could be based on some sort criteria
  to select the position(s) to show, for instance give priority to the
  positions that toggle more positions

- or by updating the solution incrementally after the first matrix
  inversion rather than invert the matrix again every time a new
  suggestion is required by the user --- even with just a 5x5 matrix the
  inversion takes some time, at least on my machine --- but that may be
  due to this that I am using MSWindows instead of GNU Linux ;-) ---

- or hiding the suggestions after some configurable time, like one
  or two second, or more

Nevertheless I believe that this solver makes this game significantly
more funny for my tired brain, as clicking on s (to require a
suggestion) and then trying only to remember the position where to
click, is quite enough thinking of that kind for me.

Very Best Regards,
   Vincent.

PS: The Calc code has been reviewed by Jay.

Attachment: 5x5.tgz
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]