Jump to content

Ultimate AutoIt Checkers


weaponx
 Share

Recommended Posts

Updated to Beta 5:

-Updated sample images

-Fixed so enemy will always jump if possible

-Removed RandomMovePiece() function

-Changed moves array from 3 dimensions to 2

-Slowed down CPU moves for visibility

-Added survival mode, 4 pieces versus the zombie horde (I've been playing too much Left 4 Dead)

Posted Image

Edited by weaponx
Link to comment
Share on other sites

I jumped the computer's second to last piece with one of my kings. That set up the king (mine) that just jumped for his last piece to jump. Instead of allowing him to jump, it automatically said "Player wins" (or whatever it is) even though the computer still had one piece left that could jump one of mine.

I like the survival mode, I don't know if it's possible though...

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

I jumped the computer's second to last piece with one of my kings. That set up the king (mine) that just jumped for his last piece to jump. Instead of allowing him to jump, it automatically said "Player wins" (or whatever it is) even though the computer still had one piece left that could jump one of mine.

I like the survival mode, I don't know if it's possible though...

There are still a few bugs when you finish off the CPU team but it usually works fine. I think you are right about survival mode being too hard, I went ahead and updated the script so there are 4 pieces on the human side, Left 4 Dead style.

Edited by weaponx
Link to comment
Share on other sites

There are still a few bugs when you finish off the CPU team but it usually works fine. I think you are right about survival mode being too hard, I went ahead and updated the script so there are 4 pieces on the human side, Left 4 Dead style.

I won a game, at which time it said "player 1 is victorious" and then proceeded to start the next game, once the board was complete it said "Player 2 has no more moves"

nothing major, but something you might want to look into.

good job by the way.

[u]You can download my projects at:[/u] Pulsar Software
Link to comment
Share on other sites

There are still a few bugs when you finish off the CPU team but it usually works fine. I think you are right about survival mode being too hard, I went ahead and updated the script so there are 4 pieces on the human side, Left 4 Dead style.

4 is way too easy... I just went through it with only loosing one king...

I think you should add an option for making the human force jump.

Once again, good work on this. I really like how it doesn't need any files with it (apart from AutoIt stuff)..

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Updated to Beta 6:

-Fixed win checking, "no moves found" bug for last enemy piece

-Updated theme for Survival Mode

-Added setup option for showing move hints

-Selected piece is now marked with an indicator

Updated screenshots in first post

Link to comment
Share on other sites

  • 1 year later...

Anyone remember "C-Robots"?

I think it would be cool to rip the AI out of this, and convert the logic to a stand-alone.

The main checker program could pass it an array containg the board status, and the AI routine could return it's move.

Then anyone could develop an AI and we could pit one against another. I made some changes to move it in that direction... Just switch both player types to "CPU" and you'll see what I'm thinking (the inoperative "Load AI" code right now just puts anything in the @ScriptDir matching "AI_*.exe" into the comboboxes)

Edit: Trashed 8 downloads by adding a fix to allow a human player to opt out of a multiple jump...

Maybe I'll just start from scratch with a c-robots sort of thing... hmm, checkers, yahtzee, poker, or the original one with little cars driving around an arena shooting at each other... am still not sure what the best mechanism would be to have a main program access two AI programs and referee battles between them. Constantly starting and stopping the .exe's would suck. Having to recompile the main program all the time to pick up the competing AI's would suck. Need to keep all three programs active at once. Maybe use ControlSend() or WM_USER messages for two-way communication between the main program and both AI's?

Checkers_b7.au3

Edited by Spiff59
Link to comment
Share on other sites

  • 3 years later...
  • 7 years later...

Hello there I know this is really old post and I've really enjoyed this game and just found a bug which you can see below here :

Spoiler
+GUI_Main()
+CreateBoard()
+CreatePieces()
+ResetPieces()
+WaitPiece() - Player 1
    Waiting for player 1 to select a piece
+ClickPiece() - Player 1
    Piece selected at [2,5]
    Piece selected at [2,5] belongs to the enemy
+ClickPiece() - Player 1
    Piece selected at [2,5]
    Piece selected at [2,5] belongs to the enemy
+ClickPiece() - Player 1
    Piece selected at [3,2]
+FlushMoves() - Player 1
+FindMoves() - Player 1 [3,2]
+HighlightMoves() - Player 1
    Move controlid created: 43 at [2,3]
    Move controlid created: 44 at [4,3]
+WaitMove() - Player 1
    Waiting for player 1 to select a move
+ClickMove() - Player 1
    Move selected at [2,3] - Source: [X,Y]
+MovePiece() - Player 1
    [3,2] -> [2,3]
+FlushMoves() - Player 1
    Deleting control id: 43
    Deleting control id: 44
+CheckWin() - Player 1
+FindMoves() - Player 1 [1,0]
+FindMoves() - Player 1 [3,0]
+FindMoves() - Player 1 [5,0]
+FindMoves() - Player 1 [7,0]
+FindMoves() - Player 1 [0,1]
+FindMoves() - Player 1 [2,1]
+FindMoves() - Player 1 [4,1]
+FindMoves() - Player 1 [6,1]
+FindMoves() - Player 1 [1,2]
+FindMoves() - Player 1 [5,2]
+FindMoves() - Player 1 [7,2]
+FindMoves() - Player 1 [2,3]
+FindMoves() - Player 2 [0,5]
+FindMoves() - Player 2 [2,5]
+FindMoves() - Player 2 [4,5]
+FindMoves() - Player 2 [6,5]
+FindMoves() - Player 2 [1,6]
+FindMoves() - Player 2 [3,6]
+FindMoves() - Player 2 [5,6]
+FindMoves() - Player 2 [7,6]
+FindMoves() - Player 2 [0,7]
+FindMoves() - Player 2 [2,7]
+FindMoves() - Player 2 [4,7]
+FindMoves() - Player 2 [6,7]
    $NumPieces_P1 = 12, $NumPieces_P2 = 12, $NumMoves_P1 = 6, $NumMoves_P2 = 4
+CPU_Move() - Player 2
+FindMoves() - Player 2 [0,5]
+FindMoves() - Player 2 [2,5]
+FindMoves() - Player 2 [4,5]
+FindMoves() - Player 2 [6,5]
+FindMoves() - Player 2 [1,6]
+FindMoves() - Player 2 [3,6]
+FindMoves() - Player 2 [5,6]
+FindMoves() - Player 2 [7,6]
+FindMoves() - Player 2 [0,7]
+FindMoves() - Player 2 [2,7]
+FindMoves() - Player 2 [4,7]
+FindMoves() - Player 2 [6,7]
+HighlightMoves() - Player 2
    Move controlid created: 43 at [3,4]
    Move controlid created: 44 at [1,4]
+ClickPiece() - Player 2
    Piece selected at [2,3]
    Piece selected at [2,3] belongs to the enemy
+MovePiece() - Player 2
    [2,3] -> [3,4]
+FlushMoves() - Player 2
    Deleting control id: 43
    Deleting control id: 44
+CheckWin() - Player 2
+FindMoves() - Player 1 [1,0]
+FindMoves() - Player 1 [3,0]
+FindMoves() - Player 1 [5,0]
+FindMoves() - Player 1 [7,0]
+FindMoves() - Player 1 [0,1]
+FindMoves() - Player 1 [2,1]
+FindMoves() - Player 1 [4,1]
+FindMoves() - Player 1 [6,1]
+FindMoves() - Player 1 [1,2]
+FindMoves() - Player 1 [5,2]
+FindMoves() - Player 1 [7,2]
+FindMoves() - Player 1 [3,4]
+FindMoves() - Player 2 [0,5]
+FindMoves() - Player 2 [2,5]
+FindMoves() - Player 2 [4,5]
+FindMoves() - Player 2 [6,5]
+FindMoves() - Player 2 [1,6]
+FindMoves() - Player 2 [3,6]
+FindMoves() - Player 2 [5,6]
+FindMoves() - Player 2 [7,6]
+FindMoves() - Player 2 [0,7]
+FindMoves() - Player 2 [2,7]
+FindMoves() - Player 2 [4,7]
+FindMoves() - Player 2 [6,7]
    $NumPieces_P1 = 12, $NumPieces_P2 = 12, $NumMoves_P1 = 5, $NumMoves_P2 = 4
+WaitPiece() - Player 1
    Waiting for player 1 to select a piece
+ClickPiece() - Player 1
    Piece selected at [3,4]
+FlushMoves() - Player 1
+FindMoves() - Player 1 [3,4]
+ClickPiece() - Player 1
    Piece selected at [1,2]
+FlushMoves() - Player 1
+FindMoves() - Player 1 [1,2]
+HighlightMoves() - Player 1
    Move controlid created: 43 at [0,3]
    Move controlid created: 44 at [2,3]
+WaitMove() - Player 1
    Waiting for player 1 to select a move
+ClickMove() - Player 1
    Move selected at [2,3] - Source: [X,Y]
+MovePiece() - Player 1
    [1,2] -> [2,3]
+FlushMoves() - Player 1
    Deleting control id: 43
    Deleting control id: 44
+CheckWin() - Player 1
+FindMoves() - Player 1 [1,0]
+FindMoves() - Player 1 [3,0]
+FindMoves() - Player 1 [5,0]
+FindMoves() - Player 1 [7,0]
+FindMoves() - Player 1 [0,1]
+FindMoves() - Player 1 [2,1]
+FindMoves() - Player 1 [4,1]
+FindMoves() - Player 1 [6,1]
+FindMoves() - Player 1 [5,2]
+FindMoves() - Player 1 [7,2]
+FindMoves() - Player 1 [2,3]
+FindMoves() - Player 1 [3,4]
+FindMoves() - Player 2 [0,5]
+FindMoves() - Player 2 [2,5]
+FindMoves() - Player 2 [4,5]
+FindMoves() - Player 2 [6,5]
+FindMoves() - Player 2 [1,6]
+FindMoves() - Player 2 [3,6]
+FindMoves() - Player 2 [5,6]
+FindMoves() - Player 2 [7,6]
+FindMoves() - Player 2 [0,7]
+FindMoves() - Player 2 [2,7]
+FindMoves() - Player 2 [4,7]
+FindMoves() - Player 2 [6,7]
    $NumPieces_P1 = 12, $NumPieces_P2 = 12, $NumMoves_P1 = 6, $NumMoves_P2 = 4
+CPU_Move() - Player 2
+FindMoves() - Player 2 [0,5]
+FindMoves() - Player 2 [2,5]
+FindMoves() - Player 2 [4,5]
+FindMoves() - Player 2 [6,5]
+FindMoves() - Player 2 [1,6]
+FindMoves() - Player 2 [3,6]
+FindMoves() - Player 2 [5,6]
+FindMoves() - Player 2 [7,6]
+FindMoves() - Player 2 [0,7]
+FindMoves() - Player 2 [2,7]
+FindMoves() - Player 2 [4,7]
+FindMoves() - Player 2 [6,7]
+HighlightMoves() - Player 2
    Move controlid created: 43 at [4,3]
    Move controlid created: 44 at [1,4]
+ClickPiece() - Player 2
    Piece selected at [2,3]
    Piece selected at [2,3] belongs to the enemy
+MovePiece() - Player 2
    [2,3] -> [4,3]
+FlushMoves() - Player 2
    Deleting control id: 43
    Deleting control id: 44
+CheckWin() - Player 2
+FindMoves() - Player 1 [1,0]
+FindMoves() - Player 1 [3,0]
+FindMoves() - Player 1 [5,0]
+FindMoves() - Player 1 [7,0]
+FindMoves() - Player 1 [0,1]
+FindMoves() - Player 1 [2,1]
+FindMoves() - Player 1 [4,1]
+FindMoves() - Player 1 [6,1]
+FindMoves() - Player 1 [5,2]
+FindMoves() - Player 1 [7,2]
+FindMoves() - Player 1 [4,3]
+FindMoves() - Player 1 [3,4]
+FindMoves() - Player 2 [0,5]
+FindMoves() - Player 2 [2,5]
+FindMoves() - Player 2 [4,5]
+FindMoves() - Player 2 [6,5]
+FindMoves() - Player 2 [1,6]
+FindMoves() - Player 2 [3,6]
+FindMoves() - Player 2 [5,6]
+FindMoves() - Player 2 [7,6]
+FindMoves() - Player 2 [0,7]
+FindMoves() - Player 2 [2,7]
+FindMoves() - Player 2 [4,7]
+FindMoves() - Player 2 [6,7]
    $NumPieces_P1 = 12, $NumPieces_P2 = 12, $NumMoves_P1 = 6, $NumMoves_P2 = 4
+WaitPiece() - Player 1
    Waiting for player 1 to select a piece

 

and look at the screenshot which is everything really clear there

 

Untitled.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...