AI Expert
sign up for this
newsletter
2006
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
Issue #8
June 2003
By Dennis Merritt
AI - The art and science of making computers do interesting things that
are not in their nature.
As always, feedback is welcome. dennis@ddj.com
Feedback
One reader asked if Prolog was psychic and could tell that Price and PriceCents
were the same in this example. Unfortunately psychic versions are only available
at advanced wizardry research institutions. Normal programmers have to spell all their
variables the same.
price(StartHour, DurationMinutes, PriceCents) :-
StartHour < 7,
StartHour > 16,
Price is Duration * 10.
Sigh. I shouldn't edit the code for clarity when it's in the newsletter. I
think I introduced a bug into the previous month's Bayesian example the same
way. From now on all code will be cut and pasted directly from working programs
and NOT edited again. I promise.
Also there was interest in the Rubik's cube program. http://www.amzi.com/articles/rubik.htm
is a link to a reprint of a PCAI article describing it.<>