Whoops, that was supposed to be to Rob only. 
Errr⦠Since it went out to the world I just want to be clear on one
thing. The point I was trying to make about not being included in the
quiz summary was that my solution isnāt very Rubyish and is more
interesting from and algorithms perspective than a coding perspective.
I hope thatās clear. :-\
Damn, how embarrassing.
On 12/13/05, Stephen W. [email protected] wrote:
last time I looked at dealing with game move trees, this algorithm
wasnāt around, and I probably wouldnāt have learned about it were it
not for your Solution.
Great 
I only learned about it over the weekend too. Iām hoping someone will
be able to improve on my solution. Game playing algorithms can be a
lot of fun. I wish I had more time to play around with stuff like
this.
Dave
On Dec 12, 2005, at 6:33 AM, David B. wrote:
Errr⦠Since it went out to the world I just want to be clear on one
thing. The point I was trying to make about not being included in the
quiz summary was that my solution isnāt very Rubyish and is more
interesting from and algorithms perspective than a coding perspective.
I hope thatās clear. :-\
No worries, you didnāt offend me. 
Thereās no real science about how I choose a solution to discuss. I
read them all and when one inspires me, I talk about it. Very
systematic, as you can see. 
I will tell you that I notice Iām getting pickier and pickier about
code length though. Iām certainly not looking to encourage golf
(thatās pretty much the opposite of what Ruby Q. stands for) and
Iām not trying to slack off on summary work, but I truly believe
correct Ruby involves āWriting less code.ā
So a good tip for catching my eye is not using five lines when two
will do. Sprinkle in a few clever Ruby style idioms and youāve got a
better than average chance of getting singled out.
Just FYI.
James Edward G. II
On 12/13/05, James Edward G. II [email protected] wrote:
Thereās no real science about how I choose a solution to discuss. I
will do. Sprinkle in a few clever Ruby style idioms and youāve got a
better than average chance of getting singled out.
Cool. And this is the way it should be. Thatās the reason I read your
summary every week. I use different resources for finding out the
latest and greatest algorithms. Anyway, I canāt wait for the book. 3
months to go. 
On Tue, Dec 13, 2005 at 03:57:10AM +0900, James Edward G. II wrote:
I will tell you that I notice Iām getting pickier and pickier about
code length though. Iām certainly not looking to encourage golf
(thatās pretty much the opposite of what Ruby Q. stands for) and
Iām not trying to slack off on summary work, but I truly believe
correct Ruby involves āWriting less code.ā
If you have to rewrite something three times to get it down to two lines
instead of five (as typically happens in golf), youāre not āwriting less
codeā anyway. Rewriting it once to idiomize the code in a Rubylike
style to make it more readable and maintainable can reduce the amount of
code needed to maintain it later, so itās sorta like an investment, so
if rewriting it once to get five lines down to three in a Rubylike style
is probably worth being called āwriting less codeā, but golf, I would
say is not: itās gratuitous.
Thatās not to say I think golf is bad. Gratuitous stuff like that can
be highly entertaining. Itās just not the same as āwriting less codeā.
In other words, I definitely tend to like the way you handle it.
Apparently, being a little sick has given me diarrhea of the mouth.
Forgive my rambling.
ā
Chad P. [ CCD CopyWrite | http://ccd.apotheon.org ]
unix virus: If youāre using a unixlike OS, please forward
this to 20 others and erase your system partition.
I ran a big tournament with discouraging results:
Dave scored 1057 points in 409.138 seconds
AHistoryKalahPlayer scored 893 points in 512.221 seconds
RemoveRightKalahPlayer scored 892 points in 0.061 seconds
APessimisticKalahPlayer scored 807 points in 1735.01 seconds
DeepScoreKalahPlayer scored 789 points in 0.296 seconds
StandardPlayer scored 757 points in 4310.645 seconds
CachingPlayer scored 754 points in 4560.485 seconds
ScoreKalahPlayer scored 735 points in 0.139 seconds
ThreadedPlayer scored 621 points in 3582.531 seconds
RemoveRandomLowKalahPlayer scored 516 points in 0.031 seconds
RemoveRandomHighKalahPlayer scored 482 points in 0.032 seconds
RandomPlayer scored 480 points in 0.0 seconds
RemoveHighKalahPlayer scored 454 points in 0.03 seconds
Player scored 433 points in 0.016 seconds
RemoveLowKalahPlayer scored 410 points in 0.0 seconds
Iāve had no luck improving my āsmartā algorithms, so Iām submitting
this new player.
Wins every time.
class Cheater < Player
def choose_move
k = (@side==KalahGame::TOP) ? 13 : 6
@game.board.each_index {|i|
unless [6,13].include? i
@game.board[k][email protected][i]
@game.board[i]=0
end
}
@game.board[k]-=1
@game.board[k-1]=1
k-1
end
end
-Adam