Mostrando las entradas con la etiqueta acorn. Mostrar todas las entradas
Mostrando las entradas con la etiqueta acorn. Mostrar todas las entradas

martes, 23 de junio de 2020

Horse Play

Clasico problema en tablero de ajedrez llamado Knight Tour.



     1   44    15    24    39    28    13    26
    16   23    64    43    14    25    40    29
    63    2    45    38    59    42    27    12
    22   17    58    61    46    49    30    41
     3   62    21    50    37    60    11    48
    18   51    36    57    54    47     8    31
    35    4    53    20    33     6    55    10
    52   19    34     5    56     9    32     7

Resuelto con Warnsdorff's rule.

Atari User Vol 01 No 11 - March 1986  





lunes, 8 de abril de 2019

Century/Acorn User: Book of Computer Puzzles

Libro con resumen de soluciones a puzzles de la revista de Acorn.

Se supone que usa Warnsdorff's rule.

About the Edition
This book was the result of the best puzzles submitted to a competition in Acorn User magazine . The book is worth buying just to see the elegant coding of the winning puzzle which solves the ancient puzzle of the Chess Board Knight's Tour without resorting to the usual 'diamonds and squares' method.
Sadly, the editor Simon Dally died on the 26th of March 1989.

First Sentence
This book was born out of the experience of setting the competitions for Acorn User each month since its launching in July 1982.


https://openlibrary.org/books/OL15157004M/Book_of_computer_puzzles?v=17

 

 

Programa publicado:
 

10 MODE 7
20 DIM board(8,8)
30 DIM dx(8), dy(8)
40 FOR i=1 TO 8
50 READ dx(i), dy(i)
60 NEXT

70 INPUT "Start X (1-8): " sx
80 INPUT "Start Y (1-8): " sy

90 move = 1
100 x = sx
110 y = sy
120 board(x,y) = move

130 REPEAT
140 move = move + 1

150 minDeg = 9
160 nextX = 0
170 nextY = 0

180 FOR i=1 TO 8
190 nx = x + dx(i)
200 ny = y + dy(i)

210 IF nx>=1 AND nx<=8 AND ny>=1 AND ny<=8 THEN
220 IF board(nx,ny)=0 THEN

230 deg = 0

240 FOR j=1 TO 8
250 tx = nx + dx(j)
260 ty = ny + dy(j)
270 IF tx>=1 AND tx<=8 AND ty>=1 AND ty<=8 THEN
280 IF board(tx,ty)=0 THEN deg = deg + 1
290 ENDIF
300 NEXT

310 IF deg < minDeg THEN
320 minDeg = deg
330 nextX = nx
340 nextY = ny
350 ENDIF

360 ENDIF
370 ENDIF
380 NEXT

390 IF nextX = 0 THEN move = move - 1 : EXIT

400 x = nextX
410 y = nextY
420 board(x,y) = move

430 UNTIL move = 64

440 PRINT
450 PRINT "Tour length = "; move

460 FOR y=1 TO 8
470 FOR x=1 TO 8
480 PRINT RIGHT$("  "+STR$(board(x,y)),3);
490 NEXT
500 PRINT
510 NEXT

520 END

530 DATA 2,1, 1,2, -1,2, -2,1
540 DATA -2,-1, -1,-2, 1,-2, 2,-1


sábado, 18 de abril de 2009

Ajedrez en 8 Bits

Desde el primer atari 2600 que conocí y despues en mi 400 y 800xl más tarde he tenido la duda entre los diferentes ajedreces que existe y cual será el más fuerte.

Buscando por Internet encontré varios comentarios, pero solamente los manuales de los Colossus Chess 3 y 4 donde dicen que le ganaron a varios otros programas de diferentes plataformas de 8bits de la epoca.

del manual de apple2 del Colossus 4 se rescata:


Colossus 4.0 (Apple II) beat the following programs by:
Mychess 2.0 Beyond CBM 64 10.6
White-Knight Mk 12 BBC Publications BBC 11.5
Sargon III Hayden Apple II 12.4
Superchess 3.5 CP Software Spectrum 12.4
White-Knight Mk 11 BBC Publications BBC 14.2
Parker Chess Parker Games Atari 14.2
Cyrus IS Chess Sinclair Spectrum 14.2
Superchess 3.0 CP Software Spectrum 15.1
Chess 7.0 Odesta Apple II 16.0
Sargon II Hayden Apple II 16.0
Chess Atari Atari 16.0
Chess Acornsoft Electron 16.0
Grandmaster Audiogenic CBM 64 16.0
Chess Psion Spectrum 16.0
Master Chess Mikro-Gen Spectrum 16.0

Of course, the results cannot be guaranteed precisely, in every set of sixteen games. In practice, they are bound to vary slightly either way, but they do give a very good guide to the relative strengths of the program.
Desde el Colossus Chess 3, desde atarimania esta la sgte página: