public TableDrivenAgentProgram(Map<List<Percept>,Action> perceptSequenceActions){
  List<List<Percept>> rowHeaders=new ArrayList<List<Percept>>(perceptSequenceActions.keySet());
  List<String> colHeaders=new ArrayList<String>();
  colHeaders.add(ACTION);
  table=new Table<List<Percept>,String,Action>(rowHeaders,colHeaders);
  for (  List<Percept> row : rowHeaders) {
    table.set(row,ACTION,perceptSequenceActions.get(row));
  }
}

public TableDrivenAgentProgram ( Map < List < Percept > , Action > perceptSequenceActions ) { List < List < Percept > > rowHeaders = new ArrayList < List < Percept > > ( perceptSequenceActions . keySet ( ) ) ; List < String > colHeaders = new ArrayList < String > ( ) ; colHeaders . add ( ACTION ) ; table = new Table < List < Percept > , String , Action > ( rowHeaders , colHeaders ) ; for ( List < Percept > row : rowHeaders ) { table . set ( row , ACTION , perceptSequenceActions . get ( row ) ) ; } }
constructs a tabledrivenagentprogram with a table of actions , indexed by percept sequences .
