Vintage computers?

Programs which generate, solve, and analyze Sudoku puzzles

Vintage computers?

Postby Guest » Thu May 12, 2005 12:00 am

OK so we've established that you can write a Sudoku solver in VB or Java on a 3GHz machine etc, but has anyone tried actually writing one on a ZX Spectrum or VIC-20? Or a ZX-81 (with 16k rampack) maybe?

What's the most primitive computer that you can possibly do this on - any thoughts?

Postby Animator » Thu May 12, 2005 8:41 am

Why would that be a problem?

A lot depends on the OS running on it, or the assembler code... older pc's tend to use different codes which (ofcourse) makes it hard to write code for them now (less people doing it, less help you can get, and maybe less docs)
Posts: 469
Joined: 08 April 2005

Postby RFB » Thu May 12, 2005 10:19 am

I think you could do it on a very primitive computer.

Many solver programs seem to use a 9x9 array for the main grid and 9x9x9 for possibles - less than a K of storage. Program logic can be quite simple if you use brute force rather than the more advanced techniques.

It is inconvenient that there are nine possible numbers - just too big to store in a single byte:(
Posts: 43
Joined: 03 April 2005

Postby Guest » Fri May 13, 2005 2:22 am

If I get really bored one weekend I might get a Spectrum off eBay (rubber keyed version, naturally) and see if I can write a solver in Sinclair basic. Would be interesting to see how long it would take to solve these problems.

On a similar note I wonder what the smallest possible program file size would be, in bytes. I suppose as you say it would depend on whether you just do it by brute force or by more clever methods - but then you could look at the product of time taken and file size as a measure of efficiency, smaller being better.

You could then divide this by the number of transistors in your device and have to competition to see who gets the lowest score! Anyone up for a challenge?:D

Postby Animator » Fri May 13, 2005 9:16 am

Comparing the size of a program is really useless...

As in, there is nothing to compare it with, for example:

What can you compare? the size of the source-files? then someone using Java will be screwed since it required lots of typing, someone using Perl will (no doubt) win...
And, what if you use an external module for some reason? does it count too?

Or are you going to compare the size of the executable? then you are left with some other questions... what if it is written in an interprinting lanauge? what do you can as executable? you can count the size of the java-class files, but in order to run them you need a Java Virtual Machine, does that count too?

Also on what OS should the executable run? When I compile a program using gcc/g++ on linux it is (much) smaller then when I compile it on Windows...

Time ofcourse can't be compared either... since that really depends on the activity of the system, and the CPU, memory and idle-ness of the system...
Posts: 469
Joined: 08 April 2005

If you really want to get crazy...

Postby Guest » Tue May 17, 2005 2:56 pm

Why not code it in postscript macros so you simply "Print" the solution to your resident postscript printer.

Or code it in EMACS macros so you Edit the problem file and whalla...the solution is editted inline.

Return to Software