[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [computer-go] Using floating point sounds very strange to me



Don Dailey wrote:

A lot of programs measure influence by means of probabilities, where a
floating point representation is much more natural. So you might see
a point on the board as being BLACK with 0.70 probability.

I think when it comes to probabilities, you would be better off storing the ratio of the two numbers, so that you can keep track of how confident you are about the move, think 7 out of 10 times that point was blacks, versus 70 out of 100 times, there is much more "confidence" in a move which is made often against a professional versus one that was made once against a novice... I suppose the detail is, reading memory twice, so

struct prob{
short int top;
short int bottom;
};

typdef unsigned long memprob;

register memprob a;
((prob)a).top = 70;
((prob)a).bottom = 100;

This way the compiler will keep the CPU from going out to main memory twice.

Robin Kramer
_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://www.computer-go.org/mailman/listinfo/computer-go/