News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

8 queens problem

Started by avcaballero, July 31, 2022, 04:26:42 AM

Previous topic - Next topic

avcaballero

https://es.wikipedia.org/wiki/Problema_de_las_ocho_reinas

Full masm 32 bits source code included.

The program generates 92 image files in the same folder with one solution in each of them. Not tested all of them, but have good looking.


:eusa_boohoo: https://www.youtube.com/watch?v=lYM3-3wg3eI

avcaballero


avcaballero

#2
I have modified the program to give only the 12 fundamental solutions, removing all symmetries, from the total of 92 solutions. I have not tested it, but it has good looking, it would be nice if someone has the time to test them according to the info in wikipedia:

https://en.wikipedia.org/wiki/Eight_queens_puzzle

Biterider

Hi caballero
Sorry, but Windows blocks the download of your zip file  :sad:

Biterider

jj2007

No problem on Win7-64, and it assembles fine. Of course, as PNGs the pics would be over 300 times smaller ;-)

avcaballero

Quote from: Biterider on August 06, 2022, 09:53:25 PM
Sorry, but Windows blocks the download of your zip file  :sad:
:hmmm:

I have splitted the zip in src+bin+img

Biterider

Hi caballero
Now Windows blocks only the bin file.  :thup:
I managed to build the exe by changing some paths according to my installation and it assembles fine.
Executing the created exe did not show anything (double-clicking or running it from cmd).
I disabled windows runtime protection and downloaded the bin file. Executing this exe version unfortunately did not change the previous result.
OS: Windows 10 Home (21H1)

Biterider

avcaballero

> Executing the created exe did not show anything

It just should generate several ppm files in the same folder than the exe is.

Maybe you could try indicating exactly the folder you want in the variable "xzNameFileWCH", maybe something like
  szNameFileWCH   db "D:\Temp\z8Queens_%#04i.ppm", 0

Biterider

Hi caballero
At first I thought that the ppm files from the download were needed as some kind of resource.
Now I have deleted these and the files have been recreated.

I checked these new ppm files and the result and everything seems correct.  :thup:

Biterider

avcaballero

Thanks for checking it, test passed.  :thumbsup:

avcaballero

I have tested one of the file missed in the list of the 4th version: the file z8Queens_0003.ppm, and it seems to be ok because it is a simmetry of the file z8Queens_0002.ppm by oblique descending, as seen in the image.