src/cellar.cpp
/* Build Ftable mapping features to their afforded actions
 */
Build Ftable mapping features to their afforded actions
Build Ftable mapping features to their afforded actions
void CELLAR::initializeFTable(FTABLE& ftable) const{
	for(int action=E_OBJCHECK, feature = 0; feature < NumObjects; action++, feature++){		
		ftable.addEntry(action, feature);		
	}
	int feature = 0; 
	for(int action=E_PUSHNORTH; action < NumActions; action++){		
		ftable.addEntry(action, feature);
		feature++;
		feature = feature % NumObjects; 
	}
	ftable.setACTIVATION_THRESHOLD(CELLAR::ACTIVATION_THRESHOLD);
	ftable.setNumFeatures(NumObjects);
	ftable.setNumActions(NumActions);
}
void CELLAR :: initializeFTable ( FTABLE & ftable ) const { for ( int action = E_OBJCHECK , feature = 0 ; feature < NumObjects ; action ++ , feature ++ ) { ftable . addEntry ( action , feature ) ; } int feature = 0 ; for ( int action = E_PUSHNORTH ; action < NumActions ; action ++ ) { ftable . addEntry ( action , feature ) ; feature ++ ; feature = feature % NumObjects ; } ftable . setACTIVATION_THRESHOLD ( CELLAR :: ACTIVATION_THRESHOLD ) ; ftable . setNumFeatures ( NumObjects ) ; ftable . setNumActions ( NumActions ) ; }
Build Ftable mapping features to their afforded actions
Build Ftable mapping features to their afforded actions
//	cout << "Creating FTable for Cellar" << endl; //Add all 'check' actions //cout << "Pushed: " << f_entry << endl; //Add all 'push' actions //object number //cout << "Pushed: " << f_entry << endl; //Reset to initial object when count reaches NumObjects (ie. new Action) //	cout << "Done" << endl;