Results 1 to 15 of 15

Thread: chess AI programming

  1. #1

    Thread Starter
    Hyperactive Member demon.KILER's Avatar
    Join Date
    Jul 2006
    Location
    I cannot remember !?
    Posts
    408

    Question chess AI programming

    hi all

    any one want to Start a chess Ai programming Challenge?

    concept: two players create their own chess Ai in any language u want and use A simple local sck connection to exchange information. And we will decide the winner in a match

    any one up ?

    If you want to make it simple for starting then we could start with a ticktacktoe
    Last edited by demon.KILER; Jan 20th, 2008 at 03:17 PM.
    VS 2005 .....Framework SDK 3.0

    "Its mostly the brave one who choose to not fight"

  2. #2
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: chess AI programming

    I am up for this. I am looking to make a simple chess AI in the upcoming months for a TORQUE game. I wouldn't mind starting with tic-tac-toe. How can our softwares compete?
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  3. #3

    Thread Starter
    Hyperactive Member demon.KILER's Avatar
    Join Date
    Jul 2006
    Location
    I cannot remember !?
    Posts
    408

    Re: chess AI programming

    code the application so that it will connect to port 5001 and then my application will send in the coordinates to ur and urs to mine

    If u have trouble coding Winsock I will give u a Dll that u can call

    i will upload my app once i finish

    coordinates
    1 2 3
    4 5 6
    7 8 9
    1 for 'x'
    0 for 'o'
    there fore for example if u want to put a 'x' in 5th one then send 11

    or any other way u want
    I am done my Algorithm - it mostly ends the match in a Draw
    its not a AI - this time its a Algorithm
    but for Chess mine will be a AI [ it will learn from its mistake ]

    edit : send "me" or "you" in the starting
    "me" = you app first
    "you"= my app first
    Last edited by demon.KILER; Jan 23rd, 2008 at 02:17 PM.
    VS 2005 .....Framework SDK 3.0

    "Its mostly the brave one who choose to not fight"

  4. #4
    Cumbrian Milk's Avatar
    Join Date
    Jan 2007
    Location
    0xDEADBEEF
    Posts
    2,448

    Re: chess AI programming

    If your interested in Chess AI, Bruce Moreland's site is worth a look. I would be interested in doing something along these lines but with an easier game like Reversi (still harder than tic-tac-toe)

    For a real challenge there is always Go, it is said that the best existing Go AI can still be beaten by an amateur human player.
    Last edited by Milk; Feb 22nd, 2011 at 09:09 AM. Reason: Edited: fixed broken link

  5. #5

    Thread Starter
    Hyperactive Member demon.KILER's Avatar
    Join Date
    Jul 2006
    Location
    I cannot remember !?
    Posts
    408

    Re: chess AI programming

    Quote Originally Posted by Milk
    For a real challenge there is always Go, it is said that the best existing Go AI can still be beaten by an amateur human player.
    well that may be cause most programmers never know what the rules are ! at least Thats my case - I tried to learn but it was too complicated for me
    VS 2005 .....Framework SDK 3.0

    "Its mostly the brave one who choose to not fight"

  6. #6
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: chess AI programming

    Quote Originally Posted by demon.KILER
    code the application so that it will connect to port 5001 and then my application will send in the coordinates to ur and urs to mine

    If u have trouble coding Winsock I will give u a Dll that u can call

    i will upload my app once i finish

    coordinates

    1 for 'x'
    0 for 'o'
    there fore for example if u want to put a 'x' in 5th one then send 11

    or any other way u want
    I am done my Algorithm - it mostly ends the match in a Draw
    its not a AI - this time its a Algorithm
    but for Chess mine will be a AI [ it will learn from its mistake ]

    edit : send "me" or "you" in the starting
    "me" = you app first
    "you"= my app first
    Sorry no response from me - I too have a nice Winsock wrapper - give me a couple days.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  7. #7

    Thread Starter
    Hyperactive Member demon.KILER's Avatar
    Join Date
    Jul 2006
    Location
    I cannot remember !?
    Posts
    408

    Talking Re: chess AI programming

    np

    I "was" done but I did some thing and now its really sewered up I need a couple of days to finish up too.
    VS 2005 .....Framework SDK 3.0

    "Its mostly the brave one who choose to not fight"

  8. #8
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: chess AI programming

    I considered a GA based chess AI for a time, before I realized that there would be no rational way to explain the rook-king endgame. At that point I went online to see what I could find, and realized that chess games generally follow canned openings until the human deviates from the standard opening. Chess computers also use canned end games, which explains away the problem I had with the rook-king end game. The rules used in the rest of the game (protect the king) are abandoned for an end game that requires attacking with the king.

    Then I encountered an article that suggests that an AI for chess would be novel, because there is no I in chess, so every I would be AI by definition. The study showed that human chess masters get where they are not by learning how to think through combinations, but by having lots of experience and a very good memory of other games. Studies show that grand masters generally evaluate only one or two moves, they just choose the right moves to evaluate. Other studies showed that if a grand master was shown a position from an actual game they were far better than a novice was at reconstructing the position from memory. However, if the same masters were shown a board where the pieces were positioned at random, then they were no better than novices at reconstructing the position from memory.

    The point is that chess computers use a brute force approach to evaluate every possible move, and fancy algorithms to snip off branches that appear unpromising. Meanwhile, human chess masters are simply playing and remembering so many games that they can evaluate a position by subconsiously comparing the position to games in memory.

    At that point, I abandoned the idea of a chess AI in favor of building a robot. There is no evidence that either humans or machines use intelligence to win chess games. Instead, the machines use brute force, while humans use encyclopedic memory.
    My usual boring signature: Nothing

  9. #9
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: chess AI programming

    Quote Originally Posted by demon.KILER
    np

    I "was" done but I did some thing and now its really sewered up I need a couple of days to finish up too.
    My networking objects are really easy to use in VB6 or .NET. You want to use them?

    Code:
    Option Explicit
    
    Private Sub cmdClient_Click()
        Me.tntcClient.Connect
    End Sub
    
    Private Sub cmdSend_Click()
        Me.tntcClient.SendData Me.txtSendData.Text
    End Sub
    
    Private Sub cmdServer_Click()
        Me.tntcServer.Listen Me.tntcServer.Port
    End Sub
    
    Private Sub tntcServer_DataReceived(strData As String)
        ' strData = "Hello dood"
    End Sub
    Attached Images Attached Images  
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  10. #10

    Thread Starter
    Hyperactive Member demon.KILER's Avatar
    Join Date
    Jul 2006
    Location
    I cannot remember !?
    Posts
    408

    Re: chess AI programming

    Quote Originally Posted by Dave Sell
    My networking objects are really easy to use in VB6 or .NET. You want to use them?

    Code:
    Option Explicit
    
    Private Sub cmdClient_Click()
        Me.tntcClient.Connect
    End Sub
    
    Private Sub cmdSend_Click()
        Me.tntcClient.SendData Me.txtSendData.Text
    End Sub
    
    Private Sub cmdServer_Click()
        Me.tntcServer.Listen Me.tntcServer.Port
    End Sub
    
    Private Sub tntcServer_DataReceived(strData As String)
        ' strData = "Hello dood"
    End Sub

    sure Why not .
    I cannot do any thing for this week Sry about that - i have so many things going on :O
    VS 2005 .....Framework SDK 3.0

    "Its mostly the brave one who choose to not fight"

  11. #11
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Re: chess AI programming

    Quote Originally Posted by Shaggy Hiker View Post
    Then I encountered an article that suggests that an AI for chess would be novel, because there is no I in chess, so every I would be AI by definition. The study showed that human chess masters get where they are not by learning how to think through combinations, but by having lots of experience and a very good memory of other games. Studies show that grand masters generally evaluate only one or two moves, they just choose the right moves to evaluate. Other studies showed that if a grand master was shown a position from an actual game they were far better than a novice was at reconstructing the position from memory. However, if the same masters were shown a board where the pieces were positioned at random, then they were no better than novices at reconstructing the position from memory.
    Ummm... there is the straightforward way of analysing your options, discard the suicidal ones and reanalyse the remaining ones. If you end up with more than one course of action that sounds promising, you take your pick based on your choice, experience, judgement etc etc. This is the strategy followed by every chess player.

    But the true 'masters' do not necessarily follow this, specially in complicated middle game or end game scenarios. They construct a position in mind which would be favourable to them and then work backwards to the current position to see which moves would force the opponent to go towards the desired position. I had once played back a classic game between Karpov and Kasparov from their world championship match where both of them seemed to be playing aimlessly for a draw, and it's only when Karpov gained the upper hand that I realized he had been slowly steering the game towards the particular position.

    If your 'studies' are from non-chess fraternity, I would take them with some grain of salt. When Bobby Fischer played d4 against Spassky, or when Anand played the same opening against Kasparov, there are psychological factors at play which I think till date the computers can use.

    Even when I learnt the endgames with a Rook, a Rook and a Pawn, a Rook and Bishop and so on, I had to learn the patterns which were winning, patterns which were losing and patterns which would lead to a draw. In a game, my task is to stay clear of the losing patterns, try to steer the game towards the winning ones and if the opponent knows as much as me, be happy to get to a draw. If I don't know the right patterns, I can't steer the game to the desired pattern. Effectively squandering away a win.

    .


    Oops, didn't notice the date My apologies!
    Last edited by honeybee; Nov 7th, 2010 at 10:28 PM.
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  12. #12
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: chess AI programming

    honey, you are digging out old threads ! This thread is approximately 3 years old !!!

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  13. #13
    Stack Overflow mod​erator
    Join Date
    May 2008
    Location
    British Columbia, Canada
    Posts
    2,824

    Re: chess AI programming

    Still a good idea for a coding challenge... but not over a network. It should focus on only one thing.

  14. #14
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: chess AI programming

    Quote Originally Posted by honeybee View Post
    Ummm... there is the straightforward way of analysing your options, discard the suicidal ones and reanalyse the remaining ones. If you end up with more than one course of action that sounds promising, you take your pick based on your choice, experience, judgement etc etc. This is the strategy followed by every chess player.
    Apparently it is not. There was a famous chess master (Lopez comes to mind, but I'm not sure) who, when asked how many moves he evaluated, replied that he only evaluated one move, but it was always the right one. Studies have suggested that he was being completely honest. Chess masters appear to only actively evaluate one or two moves. The studies are pretty interesting, and should be available on line.
    My usual boring signature: Nothing

  15. #15
    Hyperactive Member BramVandenbon's Avatar
    Join Date
    Jan 2002
    Location
    Belgium
    Posts
    502

    Re: chess AI programming

    It sounds believable that players often evaluate the correct move first.

    Even in far more complicated board games such as Go (a more abstract game), often the best move is the first one that comes to mind. But strong players such as Lee Chang Ho have declared to read more than 100 moves ahead to verify it. As a medium experienced player (7 years) I usually don't read more than 15 moves ahead.

    I only find it natural that on a smaller board with far more restrictions (such as the boardgame chess), this is probably even more the case than in Go (where the board is 19x19 area and almost every spot can be played).

    For more info about go: http://en.wikipedia.org/wiki/Go_(game)
    Last edited by BramVandenbon; Feb 22nd, 2011 at 09:04 AM.
    ____________________________________________

    Please rate my messages. Thank you!
    ____________________________________________
    Bram Vandenbon
    http://www.bramvandenbon.com

Posting Permissions

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



Click Here to Expand Forum to Full Width