Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
I can't remember the last time I queened a pawn and wanted anything other than a queen though
Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
Mich Robinson wrote:Latest version (d6.1) adds:
* Better play
* Sound
* Drag and drop pieces
* En passant
* Game history if you click the "history" pawn
Chess
I'll admit I make changes to the program quite often so it's quite likely a bug has crept in (these chess programs are quite complicated). Thanks for alerting me - I'll find out what it is and fix it soon. Are there other bugs you noticed?Arun Giridharan wrote:There is Tooo much Bug in your program, it won't accept checkmate rather it says stalemate.
Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
Mich Robinson wrote:Are there other bugs you noticed?
Arun Giridharan wrote:First : It makes same set of moves again and again no AI(bug1).
At the moment it plays somewhere around ELO 1500 (I think) which is a middling chess club player. To make it play even at that level requires quite a lot of AI. I'm finishing a couple of small projects at the moment but my aim after that was to improve the strength of the chess program - I really wanted it to play at around ELO 1900 - 2000 but also keeping it fun to play.Arun Giridharan wrote:Second: Because of no AI it's easy to beat from [1 to 10 IQ]
I'm looking into this.Arun Giridharan wrote:Third : It never accepts Checkmate , during the proccess of checkmate something bad happens ( sometime i don't see my King
magic bug)
Thank you.Arun Giridharan wrote:Fouth:Rest is pretty good, i got inspired .
Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
Thanks for the commentsStephan van Hulst wrote:Hi Mich,
If I may comment on your coding style, you will be a lot less likely to introduce bugs if you get rid of all the static fields and constants. Don't use static fields. And instead of all the int and String constants you're using, use enums instead. About all the arrays you've got hardcoded, it may be preferable to read their contents from a file.
I would also refactor the paint() method, which is an absolute leviathan. Although you mentioned you might have used another's version?
Overall, try to break everything up in more classes that handle separate responsibilities.
Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
Mich Robinson wrote:
PS What is your chess rating? Have you written a chess program yourself?
Mich Robinson wrote:
I'm looking into this.Arun Giridharan wrote:Third : It never accepts Checkmate , during the proccess of checkmate something bad happens ( sometime i don't see my King
magic bug)
Mich Robinson wrote:
At the moment it plays somewhere around ELO 1500 (I think) which is a middling chess club player.
Impressive! I don't think my program will get to 2300 even if I get my planned changes working.Arun Giridharan wrote:I'm a FIDE MASTER
The program certainly used to play en passant and I'm not sure why this would change. My bug list is starting to expandArun Giridharan wrote:I forgot to say there is no En passant move.
By bug do you mean it does something illegal or do you mean it just makes a bad move. Unfortunately the issue I'm having with pruning the search tree is pruning far too much and the program then has to decide between the moves it's left with. I was a little frustrated trying to fix it last time and put the project on the back burner. Hopefully when I clear this bug it will start to improve dramatically. Unfortunately I'm only a moderate chess player so there's only so much I can add. If you have the time to occasionally play the program then I'd appreciate any suggestions on how to improve the program.Arun Giridharan wrote:But still there are lot of bugs in the middle game.
I'll have to bow to you on this though it was regularly beating players ranked up to 1500 over the internet but their ratings could be inflated.Arun Giridharan wrote:No, ELO 1500 player play much better than this ,if you ask me it might be 900-1000 or 1200 (my guess).
Strange - I haven't changed anything yetArun Giridharan wrote:It accepts checkmate, thanks.
Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
Mich Robinson wrote: If you have the time to occasionally play the program then I'd appreciate any suggestions on how to improve the program.
I have found the bug in the en passant and have fixed it in development. There is currently an issue in the tree pruning which I've already mentioned and this is causing all the checkmate/stalemate issues and most of the bad move issues. It's very kind of you to tell me about bugs as this allows me to fix them, I also appreciate any constructive suggestions on making the program better however you'll stand on firmer ground regards the sarcasm when you've had a go at writing a chess program yourself.Arun Giridharan wrote:
Sure , Note down another bug it accepts checkmate even before checkmate, pretty awesomeMich Robinson wrote: If you have the time to occasionally play the program then I'd appreciate any suggestions on how to improve the program.
.
Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
RalphRalph Cook wrote:chess programs are exceptionally high users of CPU and memory. To take your program and raise its prowess by a few hundred points is likely going to take a lot of both. It is also likely to be handling things loops in a way most of us programmers never have to deal with: millions and millions of loop iterations, with a time limit measured in minutes or seconds. While in those loops, it makes a LOT of sense to limit object construction, which is a CPU-intensive operation in Java at the lower level. Again, I haven't seen the code, am not commenting on the specifics, but if there are values that can be held in statics in those lower levels, it might make perfect sense. It would certainly be better than constructing objects at that level, and may even be better than using an instance reference -- I don't remember that much about all the jump tables java goes through for instance references vs statics.
My point really is that a chess-playing program has unusual constraints, and that makes it even more advisable to evaluate what constructs to use rather than just say "statics are 'BAD'".
I think it would add a lot to show the piece while it's being dragged. I have some code somewhere that does that, if you're interested. And if there's a link to the source you could send me privately, I'd be interested in that as well.
Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
Mich Robinson wrote:Common sense says it must cost time to pass arrays back and forth between methods.
I know nothing about the internals of Java but this would be my reasoning. In any language I can only see two ways to pass an array:Stephan van Hulst wrote:
Mich Robinson wrote:Common sense says it must cost time to pass arrays back and forth between methods.
Why?
Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
Stephan van Hulst wrote:In my experience, it's useful to start learning that certain practices are 'evil', and should only be used when you have a sound reasoning for why you are using them.
Besides, even if statics made the program faster (which I sincerely doubt), it wouldn't be advisable to make such an optimization before performing benchmarks and figuring out where the bottlenecks in a program are.
I agree that chess programs work within difficult constraints, but this is still no reason to throw standard practice out of the window before you have properly tested.
I should note that I can't really comment on the implementation of methods, because I decompiled the class file. But what stood out was that there were only two class files for an entire graphical chess program, one of which takes way too much responsibility, has oodles of static fields and constants with hard names. My point is that if you're going to write a program in Java, you should probably use good Java practices. If speed is your only concern, you might as well write in C.
Ralph Cook wrote:
I regard statics as a case where, when I'm using them, it is good to know exactly why they are better than a non-static construct, and to take extra care that their use does not cause side effects that are not obvious to the program reader.
Arcade : Alien Swarm
Board : Chess - Checkers - Connect 4 - Othello
Mich Robinson wrote:I've managed to fix most of the issues reported. It's playing a bit better but it still isn't playing well yet. Feel free to give it a try (Fun Chess v16.4). I do have a few ideas on how to improve the strength but that will have to wait till Christmas is over.
Mich Robinson wrote:I would actually love to write this in C just because C would give me a 10x speed increase but sadly no-one would be able to play the program unless they installed it and that is too big a sacrifice.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |