connect four (game)

namenobodywants nospam.namenobodywants at gmail.com
Sun Nov 26 09:01:00 EST 2017


On Sunday, November 26, 2017 at 7:09:25 PM UTC-8, Michael Torrie wrote:

> So you are using this Infinity class as a sentinel value of some kind?
> Representing game state?  There may be an easier way than a full on
> custom type.  Sometimes just a sentinel object is sufficient.  Or an
> enumeration.

they're not sentinels; they're the maximum and minimum of the extended real
numbers; the point is that, no matter how boards are evaluated (which is, of
course, subject to change), a won game is always the most valuable and a lost
game is always the least valuable; ordinary real numbers could be used for the
purpose, but in that case i would have to figure out the maximum and minimum of
 the heuristic values the script assigns and then add/subtract one (for
example) to get the value of a won/lost game

peace
stm




More information about the Python-list mailing list