Uri Blass wrote:I simply did not consider searching for important information about it.
If you were one of my programmers, I would kick you out.
Tony
Moderators: hgm, Rebel, chrisw
Uri Blass wrote:I simply did not consider searching for important information about it.
Perhaps it's a matter of time or interest.bob wrote: Why don't you do what I did? Pick up a manual and find out how to check the time, or (in unix) to use the select() system call to check for input available, or to use malloc() to allocate memory, or to use fork() to create a new process, or to use open() to create a new file or access an old one. Etc.???
You seem to contradict yourself here. Either you know they will work, or you don't. Personally, I'm more confident that those things will work (properly and with my code) if I write them myself.Harald Johnsen wrote:Perhaps it's a matter of time or interest.bob wrote: Why don't you do what I did? Pick up a manual and find out how to check the time, or (in unix) to use the select() system call to check for input available, or to use malloc() to allocate memory, or to use fork() to create a new process, or to use open() to create a new file or access an old one. Etc.???
I can say that - for me - those low level things have absolutly no interest.
I don't even care about the winboard or uci protocol, this is some low level coding, you do it once and never look back.
The search, the eval, the heuristics, this is what a chess engine is about, those things *are* interesting (in this context).
When you copy those low level functions you can spare a lot of time because you know that the code will work. OTOH some of those low level function found is some source are so outdated that it's only luck if they still work.
I don't know anything about get_system_time(), but as long as it doesn't overflow twice in the time period you're measuring, then the subtraction will still give you the elapsed time. You only get into trouble when you expect time t+x to be greater than time t when it's not due to an overflow.How many ppl now that the usual get_system_time() used in so many engines returns an overflowed number and that they compute their delta time by subtracting two overflowed numbers ?
HJ.
I third that.tvrzsky wrote:I just second that. My guides when i started writing a chess program about eight years ago was a very informative book Chess on PC by Chessbase's Frederic Friedel and Dieter Steinwender and then primers on C programming which I had many .
Yet I had to learn and figure lot of things by myself (note that I am neither programmer nor scientist or engineer) and surely I was "reinventing the wheel" most of the time but I do not regret it. I remember the certain feel of proudness (please take it with humour) when I realized that MY system of storing the board is also well known as 0x88 (for example). So it is a matter of choice, you can use somebody's source and have strong engine virtually for nothing from which you can launch or spend hundreds and maybe thousands hours of hard work only to end with perhaps just mediocre one but YOUR OWN one. However it is definitely possible to do it without making any copy/past things.
Filip