8- Queens!

Posted: 29th January 2009 by Osama Gamal in Programming
Tags: , ,

8-Queens is a well-known puzzle that you had to place 8 queens on a 8×8 chess board.

In the Artificial Intelligence course that we studied last term “3rd CSE” we implemented 8-Queens using PROLOG. Prolog did a great job in searching but I thought alot about how to impelment it using a normal programming language? After TermExams I started with Mohamed Attia to try to write a C# Code to solve the 8-Queens problem.

First I coded the GUI, then Mohamed Attia wrote his C# program to get 8-queens .. read more about it here.

Then I made a Depth First Algorithm to be able to solve N-Queens Puzzle:

Then I implemented the flowchart and it worked very good. Finally I’m gonna mege it with my GUI isA and adding some good function.

w8 for the final version.

  1. mesh fahem 7aga :(

    bs mabrook 3la el wordpress :)

  2. Osama Gamal says:

    [quote comment="125"]mesh fahem 7aga :(

    bs mabrook 3la el wordpress :) [/quote]
    It is not complicated :D
    But .. Thanks :)

  3. badshakli says:

    mm dats gud but it is not implemented through genetic algo and doesn’t take any input from the user.

  4. Osama Gamal says:

    @badshakli: This version doesn’t take input from user. I was just trying to get n-Queen solutions :)
    I may try to add this option if I have time :D