Thread: Chess.....knight

  1. #1
    Unregistered
    Guest

    Wink Chess.....knight

    hello,I am a chinese
    my English is broken,so I can't express very well,sorry
    this is a brainstorming....
    *==>knight
    this is a 5*5 chess board
    |*| | | | | |1| | | | | |1| | | | |
    | | | | | | | | | | | | | | | | | |
    Start| | | | | |==> | |*| | | |==>| |2| | | |==>........
    | | | | | | | | | | | | | | | |*| |
    | | | | | | | | | | | | | | | | | |
    you have 24 steps to walk through every blocks........
    and print the result(1~25).......
    Can you give me an answer, please?

  2. #2
    Unregistered
    Guest
    post again
    |*|_|_|_|_|
    |_|_|_|_|_|
    |_|_|_|_|_|
    |_|_|_|_|_|
    |_|_|_|_|_|
    *********
    |1|_|_|_|_|
    |_|_|_|_|_|
    |_|*|_|_|_|first step...
    |_|_|_|_|_|
    |_|_|_|_|_|
    *********
    |1|_|_|_|_|
    |_|_|_|_|_|
    |_|2|_|_|_|second...
    |_|_|_|*|_|
    |_|_|_|_|_|
    *********
    |1|_|_|_|_|
    |_|_|_|_|_|
    |_|2|_|_|*|third.....
    |_|_|3|_|_|
    |_|_|_|_|_|

  3. #3
    Unregistered
    Guest
    |1|_|_|_|_|
    |_|_|_|_|*|
    |_|2|_|_|_|third.....
    |_|_|_|3|_|
    |_|_|_|_|_|

  4. #4
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    A good place to start would be some sort of heuristic. A basic pattern can be seen if you take every square on the board and calculate how many squares a knight can legally get to from that square. When you come to move your knight aim for the square with the most possibilities. The A* pathfinding algorithm may prove some help to you....
    This may prove interesting.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. creating chess game...
    By jamort in forum C++ Programming
    Replies: 19
    Last Post: 07-01-2009, 03:30 AM
  2. chess program.
    By myk_raniu in forum C++ Programming
    Replies: 2
    Last Post: 12-19-2005, 03:32 PM
  3. chess ai contest
    By Raven Arkadon in forum Contests Board
    Replies: 7
    Last Post: 07-09-2005, 06:38 AM
  4. Ultra chess engine contest
    By yodacpp in forum Projects and Job Recruitment
    Replies: 8
    Last Post: 11-21-2004, 07:58 AM
  5. Ultra chess engine
    By yodacpp in forum Game Programming
    Replies: 2
    Last Post: 11-19-2004, 12:33 PM