Class SokratesAgent

  • Direct Known Subclasses:
    BenchmarkAgent

    public class SokratesAgent
    extends java.lang.Object
    Puzzle agent tries to solve a solitair board game by recursiveky applying means-end-reasoning.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected IBoard board
      The puzzle board.
      protected long delay
      The delay between two moves (in milliseconds).
      protected int depth
      The depth of the current move.
      protected java.lang.String strategy
      The strategy (none=choose the first applicable, long=prefer jump moves, same_long=prefer long moves of same color, alter_long=prefer long move of alternate color).
      protected int triescnt
      The number of tried moves.
    • Constructor Summary

      Constructors 
      Constructor Description
      SokratesAgent()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      IFuture<java.lang.Void> body​(IInternalAccess agent)
      Setup the gui and start playing.
      protected void createGui​(IInternalAccess agent)
      Create the GUI (if any).
      protected void print​(java.lang.String text, int indent)
      Print out an indented string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • board

        protected IBoard board
        The puzzle board.
      • triescnt

        protected int triescnt
        The number of tried moves.
      • depth

        protected int depth
        The depth of the current move.
      • delay

        protected long delay
        The delay between two moves (in milliseconds).
      • strategy

        protected java.lang.String strategy
        The strategy (none=choose the first applicable, long=prefer jump moves, same_long=prefer long moves of same color, alter_long=prefer long move of alternate color).
    • Constructor Detail

      • SokratesAgent

        public SokratesAgent()
    • Method Detail

      • createGui

        protected void createGui​(IInternalAccess agent)
        Create the GUI (if any).
      • print

        protected void print​(java.lang.String text,
                             int indent)
        Print out an indented string.
        Parameters:
        text - The text.
        indent - The number of cols to indent.