Not many people solved this one, so I wanted to see if it was too  
tough.  Didn't seem so:

#!/usr/bin/env ruby -wKU

puts "One moment..."
puts
words = File.open(ARGV.shift || "/usr/share/dict/words") do |dict|
   dict.inject(Hash.new) do |all, word|
     all.update(word.delete("^A-Za-z").downcase => true)
   end.keys
end

guesses = Array.new

loop do
   puts guesses.empty?                                       ?
        "Please enter a word pattern (_ _ _ _ for example):" :
        "Please update your pattern according to my guess (_ i _ _  
for example):"
   pattern = $stdin.gets.to_s.delete("^A-Za-z_")
   if pattern.include? "_"
     if (guesses - pattern.delete("_").split("")).size > 6
       puts "I'm out of guesses.  You win."
       puts
       exit
     end
   else
     puts "I guessed your word.  Pretty smart, huh?"
     puts
     exit
   end

   choices = words.grep(/\A#{pattern.tr("_", ".")}\Z/i)
   odds    = Hash.new(0)
   choices.each do |word|
     word.split("").each do |l|
       next if guesses.include? l
       odds[l] += word.count(l)
     end
   end
   guess = odds.max { |(_, c1), (_, c2)| c1 <=> c2 }.first rescue nil

   guesses << guess
   puts "I guess the letter '#{guess}'."
   puts
end

__END__

James Edward Gray II