Please turn on javascript in your browser to play chess.
Only Chess Forum

Only Chess Forum

  1. 14 Dec '06 21:00
    I've decided to rewrite my chess engine from scratch (more or less), and since blogging is so popular these days I decided to write about my progress.

    From scratch to the engine beating me. Let's see if I can do it.

    Feel free to drop by and point out all the errors I'm making.

    http://mediocrechess.blogspot.com/
  2. 14 Dec '06 23:03
    It sounds like an intersting project, I wish you luck in it. I wrote a chess program about 12 years ago in Pascal, while at university, after months of work I had a program that worked, could play some basic chess but couldn't checkmate you. Some would say the perfect opponent!

    I really should dig it out and have a look at it again!
  3. 15 Dec '06 02:25
    One common problem with chess engines not being able to mate is they don't recognize that a mate in 1 move is better than a mate in 3 moves.

    As long as the mate is within the horizon it can't see the difference between the mates, so it just moves back and forth.

    I'll put a in a post about that when I get to the evaluation part.
  4. Standard member DeepThought
    Losing the Thread
    15 Dec '06 05:04
    Originally posted by Zlaire
    One common problem with chess engines not being able to mate is they don't recognize that a mate in 1 move is better than a mate in 3 moves.

    As long as the mate is within the horizon it can't see the difference between the mates, so it just moves back and forth.

    I'll put a in a post about that when I get to the evaluation part.
    You can stop that by scoring mate in one slightly higher than mate in 2 and so on, which is going to be easiest to implement by scoring checkmate as (327 + ply_depth_of_search) pawns and subtracting 1 (adding 1) to the score if it is over 326 (beneath -326) just before you return from the alpha-beta function, this way the function treats quicker checkmates as better scoring. Alternatively start iterative deepening from 1 ply.
  5. 15 Dec '06 07:13
    Originally posted by Zlaire
    I've decided to rewrite my chess engine from scratch (more or less), and since blogging is so popular these days I decided to write about my progress.

    From scratch to the engine beating me. Let's see if I can do it.

    Feel free to drop by and point out all the errors I'm making.

    http://mediocrechess.blogspot.com/
    Excellent ...I've always wanted to know how to start creating a chess engine, so good on ya mate, I'll be looking forward to this post and your blog!
  6. 15 Dec '06 11:38
    I think bitboards (and rotated bitboards) will be easier to manage in the long run, and they have some properties which are very hard to get with any kind of array implementation.

    Just my opinion- might save you some time later on.
  7. 16 Dec '06 12:29 / 1 edit
    Yeah I know bitboards has its advantages, but not only is the basic implementation quite complicated, they are also a whole other way of thinking in terms of move generation etc.

    Most programmers starting a chess engine would first think of a basic array to represent the board, and the 0x88 scheme is an extension to that. Bitboards are a whole other deal.

    So for my engine (being a source of learning as well) I think 0x88-representation is more suited.

    Perhaps I'll move on to a bitboard engine after this...
  8. Standard member John of Reading
    Scotch addict
    16 Dec '06 15:49
    I wrote one in 1986, in Z80 assembler. It beat me.
  9. 16 Dec '06 15:58
    Originally posted by John of Reading
    I wrote one in 1986, in Z80 assembler. It beat me.
    That's pretty impressive! especially considering the memory restriction you'd have been under. How much memory did it have? 2K? 5K?

    And my second question is, were you any good at chess in 1986?
  10. Standard member John of Reading
    Scotch addict
    16 Dec '06 16:04
    My code and data had to fit in about 32K.

    How strong was I then? Good question! I never played regularly until joining RHP, so my first few games here might be a good indication of my strength then. 1400 in RHP terms? I've never had an OTB rating.
  11. 16 Dec '06 16:38
    A small program..

    http://home.hccnet.nl/h.g.muller/max-src2.html

    2000 characters, and still playing with all rules etc. Some kind of record I'm sure.
  12. 18 Dec '06 13:26
    I've added a bunch more posts, got FEN-strings up and running etc.

    Let me know if you're following the blog (through comment or e-mail), always nice with some feedback.
  13. 18 Dec '06 14:17
    I am with you.
  14. 24 Dec '06 12:46
    Pseudo-legal move generation up and running. Soon I can start working on the search algorithm!
  15. 07 Jan '07 00:18
    First beta version released. The engine is playing pretty darned well considering the simple evaluation it uses at the moment.