Results 1 to 3 of 3
  1. #1
    Kareem Mesbah is offline Member
    Join Date
    Sep 2012
    Rep Power

    Default Eight Queens Problem

    I know I made it pretty complex :( but really I got tired of thinking how to solve this problem although I know what the algorithm is

    the question is 7.24 (Eight Queens) Another puzzler for chess buffs is the Eight Queens problem, which asks the
    following: Is it possible to place eight queens on an empty chessboard so that no queen is “attacking”
    any other (i.e., no two queens are in the same row, in the same column or along the same diagonal)?
    Use the thinking developed in Exercise 7.22 to formulate a heuristic for solving the Eight Queens
    problem. Run your application. [Hint: It’s possible to assign a value to each square of the chessboard
    to indicate how many squares of an empty chessboard are “eliminated” if a queen is placed in that
    square. Each of the corners would be assigned the value 22, as demonstrated by Fig. 7.31. Once
    these “elimination numbers” are placed in all 64 squares, an appropriate heuristic might be as follows:
    Place the next queen in the square with the smallest elimination number. Why is this strategy
    intuitively appealing?]

    and this is the algorithm I am trying to use

    and here's my code. please help !!

  2. #2
    Kareem Mesbah is offline Member
    Join Date
    Sep 2012
    Rep Power

    Default Re: Eight Queens Problem


  3. #3
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Rep Power

    Default Re: Eight Queens Problem

    Hello and welcome! Please use [code][/code] tags when posting code so we can easily read it!

    Forum Rules
    Guide For New Members
    BB Code List - Java Programming Forum

    Yeah, I'm not going to try and read through that mass of text. You can try pasting it here using code tags mentioned above, but unless you provide a specific question, I don't think anyone will have a specific answer.

Similar Threads

  1. Eight Queens Problem (2)
    By kaplis in forum New To Java
    Replies: 13
    Last Post: 06-24-2012, 05:01 AM
  2. Replies: 1
    Last Post: 05-30-2012, 05:45 AM
  3. The N Queens Problem
    By IAmDan in forum New To Java
    Replies: 1
    Last Post: 03-19-2012, 08:45 AM
  4. Eight Queens Problem
    By Jtrtoday in forum New To Java
    Replies: 6
    Last Post: 01-28-2012, 11:53 PM
  5. Pruning?? (N-Queens problem)
    By n00neimp0rtant in forum New To Java
    Replies: 1
    Last Post: 02-14-2010, 06:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts