|
Post by bplus on Nov 20, 2023 18:52:49 GMT
Hi quick try of program first game stuck after I added _FullScreen line so I read the text font! It took me awhile to figure out you had to go way, way, way left to go up and well way, way, way right to go down rows. In a couple of moves I am stuck program wont let me jump two to get to top row?? The checker I want to use is in the 2nd Black square on right most column, it's blinking on/off and clearly can jump two Black checkers and go to top row for King! Really like this topic, your links always interesting and looks like damn good start of checkers game AI.
|
|
|
Post by bplus on Nov 21, 2023 13:45:12 GMT
Thank's for the interest in the program bplus,I also had a problem with trying to move the Pieces try again! you have to Highlight the from Piece then enter and then Highlight the to square then enter,more about this below,but from your picture above I can't see how you can take any Piece!? As I said under the snapshot, the checker on right most column (2rd black square up from bottom right corner) was blinking and so you cant see checker also the destination after jump was blinking you can see from missing edges. Anyway... Oh look! our board is drawn incorrectly! The checkers are supposed to be of red squares? Is Chinook another name for Checkers or the name of website? Yes, I may have something started for that already. I was working on AI when I got distracted. No I think I finished the board referee ablility to judge legal moves including specially the difficult jump situations like the case that I took the snap of above. Great I don't have time for pondering AI but I think I can setup the graphical Interface with mouse and number red squares so it looks like the Chinook link you gave. I will have likely maximised the size to fit your screen, so only one size. Lets see if red and black even lines up with Chinook version! It's been years since I looked at it.
|
|
|
Post by bplus on Nov 21, 2023 14:02:07 GMT
Are we agreed on this layout and coloring scheme? from Britannia Checkers Rules:
|
|
|
Post by bplus on Nov 21, 2023 14:13:48 GMT
In 350 LOC including over 30 lines comments I have everything done as far as moving with mouse and checking legal moves ie beeps if you start on wrong piece or empty square. I have a beautiful board drawn and really would hate to ugly it with numbers It appears 0 AI has been started BUT legal moves are likely done! So 2 players can play on it now, I think. If I agree to share this code you must agree to share the AI code that you use for it, so each of us can ask/answer questions to get the thing built good!
|
|
|
Post by bplus on Nov 21, 2023 18:55:26 GMT
Good idea! We can display numbers in an 2-3 sec max overlay then clear. Making code understandable to another is great! though understandable is in the eye of the beholder Ah! just a keypress to toggle, Numbers on / Numbers off
|
|
|
Post by bplus on Nov 21, 2023 19:38:14 GMT
Have you heard that in Checkers you must jump if there is a place where you can? No choice, you can't move any other piece unless it takes care of a jump. That's how my board Referee plays things. Also If you jump and there is immediately another jump, you must make that too, it keeps going until no more jumps left. (I just played a board game and cleaned up! because of that rule.)
|
|
|
Post by bplus on Nov 22, 2023 13:52:10 GMT
Have you heard that in Checkers you must jump if there is a place where you can? No choice, you can't move any other piece unless it takes care of a jump. That's how my board Referee plays things. Also If you jump and there is immediately another jump, you must make that too, it keeps going until no more jumps left. (I just played a board game and cleaned up! because of that rule.) Yes! it's the International Checkers rule you have to jump everything possible until the jumps stop!!! As a kid when I actually played this game, I never knew about this rule but Chess was way more interesting game anyway, even Monopoly ot Stratego. At ARB I think easy to add number system for move notation easy to add but I see you making your AI based on that notation system? Otherwise I have to relearn how I checked moves with a B = Board 2D array. Guess I am asking do you prefer to do your AI from a 32 numbered list array or a 2D array? Maybe it doesn't matter can do AI both ways. Eventually the AI is going to have to say Move from N square to M square. The Board referee has to translate to Board() and see if legal move. It does say if next player has a jump that they must play when it announces whose turn it is. So Black always moves first so if you the human want to go first we have to spin the board around for player view of board (and square numbers will be seen reversed. That I have to fix already.
|
|
|
Post by bplus on Nov 23, 2023 14:55:11 GMT
AT ARB, I AM THINKING THE AI WILL BE INPUT A BOARD OF WHERE ALL THE PIECES ARE. THE AI'S JOB IS TO RETURN IT'S NEXT MOVE WHICH BETTER BE LEGAL ;-)) IN OTHER WORDS THE AI WILL BE A FUNCTION THAT GETS THE BOARD POSITION OF ALL THE PIECES AND IT RETURNS A STRING TO MOVE PIECE AT NUMBER X TO NUMBER Y. THAT WAY I CAN DEVELOP THE INTERFACE INDEPENDENT OF AI AND VICE VERSA FOR AI'S. PLUS! WE CAN USE WHATEVER TYPE WE LIKE I THINK YOU WILL BE GOOD IF YOU JUST GET A LIST FROM 1 TO 32 WITH WHAT KIND OF PIECE IS AT EACH BOARD POSITION, IF ANY. CORRECT? FUNCTION MYNAMEAI$(BOARD$()) ' ANALYSE BOARD$() HOWEVER YOU LIKE MYNAMEAI$ = "NUMBER NUMBER" ' THE AI MOVE FROM FIRST NUMBER TO 2ND NUMBER END FUNCTION MY USER INTERFACE TAKES THAT MOVE AND TRANSLATES THAT TO IMAGE FOR HUMANS TO SEE, HUMAN THEN MOUSE CLICKS HIS MOVE. IF MOVE IS ILLEGAL OR IS MULTIPLE JUMP THE REFEREE WILL SEND THE BOARD BACK TO THE AI FOR NEXT MOVE EITHER UNCHANGED OR WITH A SINGLE JUMP MADE. SO AI ONLY JUMPS ONCE AND WILL GET BOARD RIGHT BACK AGAIN IF ANOTHER JUMP NEEDS TO BE DONE. I'VE CLEARED UP MY OWN QUESTIONS ON WHAT TO SEND AI TO WORK WITH. JUST SEND IT A LIST OF WHERE ALL THE PIECES ARE 1 TO 32. IT MIGHT ALSO HAVE REMIND THE AI IF IT IS BLACK OR WHITE THAT WAY THE AI COULD PLAY ITSELF! FOR NAME OF INTERFACE PROGRAM, I AM THINKING 'CHECKERS WITH AI(S)' MORE THINKING AS I WRITE: THE AI MIGHT WANT TO SAVE LAST BOARD IN CASE IT GETS SAME BOARD BACK, AS THAT WOULD BE A SIGNAL FROM REFEREE THAT IT'S LAST MOVE WAS JUDGED TO BE ILLEGAL. WHICH TELLS THE AUTHOR OF THAT AI, HE MIGHT NEED A BACKUP / PLAN B MOVE OTHERWISE INFINITE LOOP GOING NOWHERE! REFEREE MIGHT WATCH FOR THAT TOO AND CALL THE GAME OVER AFTER 3+ REPEATED BOARDS AND MOVES. MORE THINKING AS I WRITE: (SEEMS THIS IS WAY I DEVELOP CODE THESE DAYS!) NOW FOR PIECE NOTATION W OR B FOR WHITE OR BLACK, AND K OR NOT FOR KINGS. SOUND GOOD? SO NOW WE KNOW WHAT BOARD LOOKS LIKE AT OPENING: THE NUMBERS ARE ARRAY INDEXES BUT REALLY COULD JUST BE A 33 CHARACTER LONG STRING, NO ARRAY NEEDED, YOU MIGHT PREFER THAT ARB? I AM THINKING ALREADY I DO! ;-)) ) 0 B 1 B 2 B 3 B ... 12 B 13 14 15 16 17 18 19 20 21 W 22 W ... 32 W AND STARTS WITH B FOR BLACK TO MOVE FIRST, 33 LINES JUST LETTERS FOR EACH ARRAY POSITION WITH POSITION 0 NAMING THE PLAYER B OR W TO MOVE
|
|
|
Post by bplus on Nov 23, 2023 20:00:43 GMT
Since Strings are indexed 1 to len of string we should use 1 to 32 for board squares then #33 say B or W's turn.
FUNCTION MYNAMEAI$(BOARD33$) ' ANALYSE BOARD33$() HOWEVER YOU LIKE
MYNAMEAI$ = "NUMBER NUMBER" ' THE AI MOVE FROM FIRST NUMBER TO 2ND NUMBER END FUNCTION
|
|
|
Post by bplus on Nov 24, 2023 15:52:39 GMT
At ARB, @anthonyrbrown , I suspect you will want the games written up with notation system. This can be done either in the AI for your own personal notation system or by Board Referee, say when it approves a move submitted by an AI player.
Jumps IMO sould be done a single checker at a time? So Referee can rule/agree or disagree and send board back to player, on each jump... White will always be an even number move if Black always starts first ie Move #1 B x to y Multiple jumps would just have more added to line Move #N B or W x to y, x1 to y1, x2 to y2 for 3 checkers jumped
Or do you have alternate idea for system in mind?
|
|