Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / Square Checkers

Author
Message
Milkman
18
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 23rd Jan 2006 17:36 Edited at: 23rd Jan 2006 17:51
well i decided to take a break from my main project and try something a little smaller for a change. since apollo was down for the weekend, it gave me plenty of time, and i actually finished my first project ever. it has no media, so if anyone would like to make it look nice by adding some good looking images, feel free to. just don't forget to give me credit

checkers anyone?

a screeny:


please let me know what you think!

"Genius is 1% inspiration and 99% perspiration"

Attachments

Login to view attachments
General Sephiro
19
Years of Service
User Offline
Joined: 27th Sep 2004
Location:
Posted: 23rd Jan 2006 18:07 Edited at: 23rd Jan 2006 18:11
bah, i couldn't figure out how to jump a piece @_@! "ARGH..... !@$&%$@#$"

Edit-----------------

Nvm i was trying to drag, when i realised i just had to click...

Computers too easy, and what no double jump? T_T

Other than that nice game ^_^

Milkman
18
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 23rd Jan 2006 18:55 Edited at: 25th Jan 2006 02:46
yes, i didn't impelment double jumping i figured the ai was kinda easy, but the system i use for it can be changed very easily to make it harder. i'll post the source so anyone who wants to look at it can.




it needs no media, so just copy, paste, and compile it.

"Genius is 1% inspiration and 99% perspiration"
Milkman
18
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 24th Jan 2006 04:24
no one likes checkers?
but really, i'm just asking what you think of the ai behind it, that's all.

"Genius is 1% inspiration and 99% perspiration"
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 24th Jan 2006 18:24
Quote: "no one likes checkers?"

well, i strongly dislike checkers, i'm more of a chess person...

"We make the worst games in the universe..."
Milkman
18
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 24th Jan 2006 20:51
i also enjoy chess more, but i wanted to code a small project very quickly - chess ai seemed a bit tough

"Genius is 1% inspiration and 99% perspiration"
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 25th Jan 2006 02:05
lol, yeah... i mean it takes someone as smart as me to be good at it

i once started looking at programing/building a chess playing robot using my lego mindstorms set... and although i could have built the mechanical part (if i borrowed a few things from my friends mindstorms set) the AI to play chess would have been a headache (especially since i'd have to be carefull with my memory usage)

"We make the worst games in the universe..."
IBOL
Retired Moderator
20
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 25th Jan 2006 10:45
well, your checkers AI beat me.
there were times when it didn't seem to know what to do,
but perhaps it was "stalling" , becuase it did lead to a decisive victory.

one problem:
it seems that the AI's first move is illegal (saw it twice)
in the upper left corner, the AIs first move is just to make its
own piece disappear.

i have never messed with these commands:
array insert at bottom move(0)
num=array count(move(0))

it seems you dim'd some arrays as jump() without a number.
does that give adjustable size throughout the program?

on my 3rd game i won.

your AI theory is good.

i'm writing a chess-like game (chess board, some chess pieces)
it checks available moves, then tries to see all kinds of things,
like if the piece could take an enemy piece from it's new position,
whether it was protecting a piece that is now vulnerable, etc.

ai is cool!
bob

Milkman
18
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 25th Jan 2006 20:39 Edited at: 25th Jan 2006 20:44
Quote: "the AIs first move is just to make its own piece disappear."

i will check that -- i never noticed it

Quote: "it seems you dim'd some arrays as jump() without a number.
does that give adjustable size throughout the program?"


that's exactly what happens when you dimension an array without a size. it creates a 'dynamic' array. you can use the 'array insert at bottom' command to add an array entry, and get the array's size with the 'array count()' command.

EDIT:

For me, the computer's first move is legal, here's a screen shot:


the reason it acted strangely for you might be because of your version of dbpro. i'm using 5.8, but i know for a fact that in older versions, dynamic arrays were handled differently.

"Genius is 1% inspiration and 99% perspiration"
Tachyon
18
Years of Service
User Offline
Joined: 15th Sep 2005
Location: four-momentum imaginary proper time
Posted: 26th Jan 2006 14:11 Edited at: 26th Jan 2006 14:11
First was draw, the I won, then it was draw again. I have played checkers once before, so I knew moves.
AI is truly awesome in the beginning! I actually wonder, that is it making the best moves possible?
It usually has advantage in the midle...
In the ending game, it doesnt "think" far enough and gets to positions where it has to give that "king?" away for free.
I noted some funny moves, like:

edit: imageshack doesnt like linking?: http://img64.imageshack.us/my.php?image=c7hb.jpg

But overall this is truly awesome AI, congratulations for coding it.

(2b)||C!(2b) (It's C++) vs. TO B OR NOT 2B (It's DarkBasic!)
Milkman
18
Years of Service
User Offline
Joined: 30th Nov 2005
Location: United States
Posted: 26th Jan 2006 21:18 Edited at: 26th Jan 2006 21:51
Thank's for the feedback

looking at the picture, you can tell my ai isn't perfect

"Genius is 1% inspiration and 99% perspiration"

Login to post a reply

Server time is: 2024-06-17 05:24:01
Your offset time is: 2024-06-17 05:24:01