|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Chess Computers
I am looking to make a program kind of like a chess computer.
What's really got me is the "foresight" thing. I roughly think that pretty much each turn the computer would find out what is and isn't a legal move, and then for each possible move, try moving it and then finding the moves again and so on until a certain point, where at which the computer would work out which one is the best possible outcome. I just want to be able to find all the possible moves. The thing I am hoping to make is more like a strategy-fight kind of thing, much like the fighting systems on Final Fantasy games, Pokemon and all those other things, where stategy is the key of the fight. It would be like either an AI character versus a human character, and also AI versus AI. The human versus human thing is easy. It's going to go into an online RPG, and I am hoping to use AI characters instead of human characters so that the game is challenging and fun even if there is only a couple of human players playing to begin with. I have made something like those before, but they only look at the "now" as it were. So for example, if it's health was under a certain point, it would heal itself, or it would choose defensive or offensive moves depending on the other player's stats, or whether the last couple of moves where very strong. I think most moves will be legal. I just want to be able to find a way to find all the possible sets of moves up to a certain point in the future, and find out what each players stats and vars would be, so I can work out the "goodness". Could anyone help? Thank you if you can. And if it helps, I plan to do this in Flash Actionscript, although I can translate from Javascript or PHP if necessary. Thankz. |
|
#2
|
||||
|
||||
|
A lot of thinking goes into good chess programs. If you're trying a different approach from the norm, I'm afraid you're on your own.
There is, however, some good resources for this. I don't remember the name of it, but there's a chess program that you can download the source for that's one of the best on Earth. It uses tratagies from previous human players to learn how to beat it's opponent. Search Google for a while, you're bound to find it.
__________________
"Science is constructed of facts as a house is of stones. But a collection of facts is no more a science than a heap of stones is a house." - Henri Poincare |
|
#3
|
||||
|
||||
|
Hmm...
I think I was only having trouble retreiving the branches of possible moves and what not, and returning the variables that would be needed to work out the goodness factor. I don't know why, but I always think that there'd be a really simple way to go about these things (and also where I read up about how chess computers work, it was pretty brief all around) but I think I've got it now. And strangely enough I never work things out until I ask someone, at which point I think "Oh wait, now I've got it". I am probably going to work on it in a format of a multidimensional for and an single array. So there'd be a for for each step into the future it is taking, and then at the final step, work out the variables for it through a certain system similar to the game system. I am starting to think now that maybe using a chess "goodness" system wouldn't work as good for my game, because a certain degree of chance is also going to be in there.
I am still stumped as to how I would go about filling the gaps for the other person's moves though. I'm not sure how to do that, whether I should go about it in the same fashion as how the computer works out the moves, or perhaps just working out all the possible moves, rather than trying to work out what the other player will do. It's a real problem I think, because I haven't seen much on how the chess computers work, and if I make it think that the human player will only choose the best possible move, well that's probably not going to happen, hence making it impossible to make use of the foresight, and if I take into account of all the possible moves that the human player could use, then when checking the gooness, it will always choose the instance where the human player chose the worst possible move. I'm not sure yet. I think I've read somewhere that most chess computers use the latter. I'll try searching on Google, but I'm a horrible internet searcher, so I'll just cross my fingers. I actually came across a site that had links to all the source code for chess computers once, about 30 or more links to source code, and not one of them worked. I'm unlucky like that. Cya, thankyou |
|
#4
|
|||
|
|||
|
What about having the computer make its decisions based on the players prior moves? You could have a range from most to least probable based on what the player had chosen in the past when confronted with similar situations. You could then take the top couple moves in this range and have the ai make its decision based the most benificial action it could take regarding the most likely actions the player would take. Hope this is helpful.
|
|
#5
|
||
|
You're apparently rediscovering a lot of things. The best backgammon automata use neural networks and are trained extensively. The approach yields master-level play.
|
|
#6
|
|||
|
|||
|
Chess Developer
Hi,
I was developed a chess game 2 years before and now I am researching to improve artificial inteligence and to make un beatable game . and I feel Glad on ur interest if u need ill send u the game and source also (if u need). ask me if u have any doubts. thank u shiva prasad email : URL URL |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Software Design > Chess Computers |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|