3 ms·
About a year ago now I finished writing some cheap code that implemented basically what he details in the blog. (My blog links the code on github: http://pro-gr
by TheCapn 15y ago
About a year ago now I finished writing some cheap code that implemented basically what he details in the blog. (My blog links the code on github: http://pro-graham.com/ http://pro-graham.com/) I wrote it for a small AI class project building on something a friend and I did two years previously. You can play the Java Applet here: http://pro-graham.com/Battleship/Battleship.html http://pro-graham.com/Battleship/Battleship.html
Essentially it weighs the board and creates what I called a Probability Map to determine where ships lie. My tests gave the computer ~48% win rate against myself and ~60% against random friends. Its accuracy is double that of a random shooting AI.
I can go into more details about the advantages and disadvantages of the algorithm here if there's any interest. I'd have posted it a couple months ago when I published it had I known there was interest in such a project...