Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cross Sum Solver
#1
http://www.pro.or.jp/~fuji/java/puzzle/c...x-eng.html

I don't know if anyone's seen this type of puzzle before... they're printed in some newspapers under the name 'Add Them Up'. At any rate, my math teacher prints off a bunch and we can do them for bonus marks on our calculus tests. Now all my tests are like 95 except for one really bad one, and the cross sum puzzles are really hard, so I'm having trouble getting the bonus marks for that test...

So basically I'm writing an algorithm to solve them for me. It's not really cheating, because I still have to think a lot, but the computer can use some 'brute force' tactics that aren't possible manually.

Anyhow, I'll you posted on this project. Should be done in the next couple days.
Reply
#2
Here it is

ReadMe File:

Quote:Cross Sum Solver
================================
by wizardcode


Okay, here it is. It's not very user friendly because I never
intended it for public release. Basically it solves the puzzles
by alternating between logical reasoning and a brute-force
recursion algorithm.

For examples sake, load up the file SUMCROSS.TXT on startup of
the program. You have to include the extension. Then press 'G'.

I originally planned this in QB, but for lack of stack space
had to switch to Turbo Pascal. Now I store the boards on the
heap and just pass pointers through the stack.

Controls:

LeftClick - whatever's on the brush (bottom left of screen)
RightClick - clear
Space - run the logical part of the algo only
G - run the whole thing to completion
ESC - get out.


Note: There is no exiting from the recursive routine once you
start it, so if a board is unsolvable, you might get some really
wierd results. Anyhow, there it is. Good luck.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)