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.

Author
Message
Methusen
21
Years of Service
User Offline
Joined: 20th Apr 2004
Location:
Posted: 4th Dec 2005 15:40
Is it possible to create a good chess program in DBPro?

Playing is the very reason for life, Making games convert you in a God.
The ARRAYinator
19
Years of Service
User Offline
Joined: 13th Aug 2005
Location:
Posted: 4th Dec 2005 16:24
Well I would say that it depends.because most of the highly advanced chess programs are written in a object oriented language like C or C++ for reasons of not only speed but advanced structeres like neural networks that need an object oriented language to stimulate.But it is probaly not impossible I mean I have used DarkBasic for a while now and it still suprises me with what it can do.As you know the 3d(or 2d) will not be the hard part but the AI that will take a lot of time and frustration considering that DarkBasic is as it says a Basic Language.My recomandation would be to learn an object oriented Language for this one.But I guess it can be done in DBpro if you were good enough a programmer.Anyway good luck!
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 4th Dec 2005 17:08 Edited at: 4th Dec 2005 17:09
It all depends on your definition of 'good'.

Can you make a chess game in DBP?
Yes, of course!

Can you make a chess game in DBP that can outwit your average player?
Yes, if you're a good enough coder.

Can you make a chess game in DBP that can outwit a Grand Master?
I would say maybe but wouldn't recommend trying.


Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 4th Dec 2005 17:12 Edited at: 4th Dec 2005 17:19
@The ARRAYinator

PFFFFFFT!

There's been several chess games written in BASIC on commodores and such that were fast and played well. You can write a terrific chess game in DBP.

It'll take you longer to learn C++ than it will take you to program an effective, highly entertaining chess game in basic. Especially a basic language like DBP, where the DX engine is already there waiting for you.

That's probably the worst advice I've ever seen anyone give someone on these boards.

If I were to give him advice I'd say, get the game pieces moving on the board as per the rules. Make the game multiplayer and worry about the AI last. This way, he'll stay inspired because he has a working program and it'll help push him through to the end when he's researching the chess ai.

Tachyon
19
Years of Service
User Offline
Joined: 15th Sep 2005
Location: four-momentum imaginary proper time
Posted: 4th Dec 2005 20:00
Trust me, its not about speed when it comes to current computers.
I have a 15 year old "computer chess board". It wins me on second level. I was finlands champion in my series when i was 12. Okay, I got into world championship and i was, well 70th. What suprises me that it wons me on level 2, where 1 is easies. Thats not all, its 3,6Mzh.
...
Trust me, its not about speed. . Im really interested about this topic, so if someone has some information I would be interested. Opensource engine?
For futher reading: http://www.gamedev.net/reference/programming/features/chess1/
Im sure that 1mzh (Penguin) would win most beginners.

(2b)||!(2b) (It's C++) 1. TO B OR NOT 2B (It's DarkBasic!)
But, that's the question!
[href] www.etachyon.tk [/href]
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 4th Dec 2005 20:14
you can program a good chess engine just sorting the best moves from 3 ply deep, thats do-able in C64 basic (although not fast) and can beat amature players like me half the time (mid ranked school club player), if you add in strong opening moves and some of the tatical tricks it should be pretty strong, we had Chess programs that could beat grand masters back when 48k was a lot of memory and cpu speeds where counted on the fingers of one hand, speed isn`t the issue, things like the IBM chess computers just use speed and deep ply searches in an attempt to be unbeatable, if you can calculate all possible moves to the end of the game then you know every best possible move for any move the opponent can make, just brute force vs skill.



Is a Troll actualy a Chav who`s on the net?, are Chavs capable of using the net? if they are, what idiot trained em?
Methusen
21
Years of Service
User Offline
Joined: 20th Apr 2004
Location:
Posted: 5th Dec 2005 02:04
Thanks everybody, I think I will try in DBPro, if someone knows where to find codes or tools in BASIC or DBPro please let me know.

Playing is the very reason for life, Making games convert you in a God.
The ARRAYinator
19
Years of Service
User Offline
Joined: 13th Aug 2005
Location:
Posted: 5th Dec 2005 02:05
Quote: "That's probably the worst advice I've ever seen anyone give someone on these boards."

How can you say that Tapewormz is a little bit of advice so wrong to say after all this is a "FORUM"!

Quote: " I guess it can be done in DBpro if you were good enough a programmer."

And is that at all saying it can not be done.

I think you took me the wrong way. I was in no way saying you could not make a chess game in dbpro.I was telling him purely about the different options methusen has.I am a C++ programmer also and object oriented does help organize code when it gets rather large like in a "Chess" game.Just saying it might be useful.That is all.But please Methusen I was in no way stopping you but informing you on what I know.
Cash Curtis II
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 5th Dec 2005 02:35
It is quite possible to write a great chess game in DBP. You'd have the advantage of great graphics, and if you could program good AI you'd be golden.

Chess simulators work by playing ahead. The further ahead you can play, the better the AI is. Research it - I'm sure there is plenty of code available in other languages that you could base yours on.

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 5th Dec 2005 09:29
It's certainly possible, but you'll find that it's not 3D interfaces or AI that get's you, it's staying in control of all the data needed.

Chess AI basically gives each piece a score, then by calculating the board and it's possibilites you can find the most valuable move for each player. The thing is though that you have to check several moves in advance, plus the most likely opponent move for each. All that data can be a nightmare to keep on top of. Personally I went for a string approach when I was experimenting with this stuff. Like you use a common reference for your moves, like A2 to A4, maybe A2A4 is the leftmost pawn moving forward 2, then seperate with a ':' and add the most likely opponent move, then seperate with a '|' to show the end of the moves and keep adding the next moves to the strings, like using each initial move as a seed to find the best initial move.

Note that usually each piece is scored by how many squares it can move to from the centre of the board, except for the king which would have a real high score to make it the ultimate goal.


Van-B

Put away, those fiery biscuits!
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 5th Dec 2005 11:11 Edited at: 5th Dec 2005 11:13
I had an attempt at a chess program a long while back, due to memory constraints the method (for one ply deep) was to play all possible moves for a peice and keep the one move that scored the most, then try all the moves for another peice and keep the best scoring move from that etc, eventualy you have a short list for all 16 peices with the best move and its score, then you pick the best score, OR in the case of a tie the best score from the lowest value peice, nowdays with more memory it might be best to keep the results for the top ten moves or whatever, since the more plys you go you might find a winning combination that looks initialy weak (ie no gain for two or three moves)

The trouble with one ply is you can set traps for the AI very easily, 2 ply is minimum and very weak, the more plys you use then the better the gameplay, the trouble is that for two ply you need to keep the moves for all peices and then play the moves for the other side, then play all the moves for the remaining peices and get the final score from them (final, not total), its best to play one peice at a time and all it`s consequent moves, don`t forget you need to move all the other peices you have to all legal postions to check for positions where you peice is protected etc, you also need to add a ranking to the score for the position the peices end up in too, the middle of the board is a stronger position than the edge for example, first thing you need is a list of the values for each peice and the board positions for them, the value of the board squares according to what moves are possible for the peices, it`s one program that REALY requires a design document thats well thought out just for the AI part, or you get nowhere fast, you can just use a text array and input for the initial "board", get the gameplay right and its easy to convert it to a graphical representation afterwards.



Is a Troll actualy a Chav who`s on the net?, are Chavs capable of using the net? if they are, what idiot trained em?
Tachyon
19
Years of Service
User Offline
Joined: 15th Sep 2005
Location: four-momentum imaginary proper time
Posted: 5th Dec 2005 11:36
What about using UCI-engines? Ever played fritz or similar, program was able to use these engines [href] http://www.chessbase.com/download/index.asp?cat=UCI%2DEngines [/href] .
Is it possible to code access to this engines, so that i could focus on coding interface? What about penguin-pieces. I have a candinate for queen: . No, but seriouslu, if someone knows about using these engines please respond?

(2b)||!(2b) (It's C++) 1. TO B OR NOT 2B (It's DarkBasic!)
But, that's the question!
[href] www.etachyon.tk [/href]

Login to post a reply

Server time is: 2025-06-12 11:18:26
Your offset time is: 2025-06-12 11:18:26