Programming language features for computer chess
Posted: Thu Jan 27, 2011 2:58 pm
One of the reasons I stopped CC is that I was unhappy with the existing languages.
What I want is so precise that it simply does not exist, though Modula 3 comes extremely close.
Yes I tried Ada but it's way too rigid and I disagree with some design choices.
I gave some thought about what features would be useful for computer chess.
Two things for me.
1) iterators (with "yield" statement)
Extremely useful for both mailbox (maybe outdated now) and bitboard.
Incremental move gen etc ...
Sure, we can do it with classes, but classes are verbose.
Also when I tried with GCC Linux, it became slower and slower.
Classes with a single field were not optimised properly.
Since then, I was told classes were fine.
Maybe I tried in a wrong way, or it didn't work with GCC then (2003 version I think).
I think if I had iterators in 2005, Fruit would be 4x smaller, and maybe more.
2) fixed-point arithmetic
I could live without that one.
But think about it: eval score, fractional plies, probabilities?
You can change the granularity with a single line of code (type declaration).
What do you think of this?
Any more ideas?
Fabien.
What I want is so precise that it simply does not exist, though Modula 3 comes extremely close.
Yes I tried Ada but it's way too rigid and I disagree with some design choices.
I gave some thought about what features would be useful for computer chess.
Two things for me.
1) iterators (with "yield" statement)
Extremely useful for both mailbox (maybe outdated now) and bitboard.
Incremental move gen etc ...
Sure, we can do it with classes, but classes are verbose.
Also when I tried with GCC Linux, it became slower and slower.
Classes with a single field were not optimised properly.
Since then, I was told classes were fine.
Maybe I tried in a wrong way, or it didn't work with GCC then (2003 version I think).
I think if I had iterators in 2005, Fruit would be 4x smaller, and maybe more.
2) fixed-point arithmetic
I could live without that one.
But think about it: eval score, fractional plies, probabilities?
You can change the granularity with a single line of code (type declaration).
What do you think of this?
Any more ideas?
Fabien.