Class GoMokuPatternsFile


  • public class GoMokuPatternsFile
    extends GoMokuPatterns
    Encapsulates the domain knowledge for GoMoku. Its primary client is the GoMokuController class. These are key patterns that can occur in the game and are weighted by importance to let the computer play better.
    • Constructor Detail

      • GoMokuPatternsFile

        public GoMokuPatternsFile()
    • Method Detail

      • getNumPatterns

        protected int getNumPatterns()
        Overrides:
        getNumPatterns in class GoMokuPatterns
        Returns:
        total number of patterns represented
      • getPatternFile

        protected java.lang.String getPatternFile()
      • getExportFile

        protected java.lang.String getExportFile()
      • readPatternFile

        protected void readPatternFile()
        the pattern file is fixed for gomoku this method fills in pattern_ and weightTable_
      • writePatternFile

        protected void writePatternFile()
        allow exporting the patterns and weight indices in a different format. ordinarily we do not export the patterns, but sometimes we might want to change the format.