 
 		ActionScore maxScore;
 
-		db.readRec(records[ctxpair] & (15 << 0), EDB_REC actionScore1 );
-		db.readRec(records[ctxpair] & (15 << 1), EDB_REC actionScore2 );
-		db.readRec(records[ctxpair] & (15 << 2), EDB_REC actionScore3 );
-		db.readRec(records[ctxpair] & (15 << 3), EDB_REC actionScore4 );
+		db.readRec(records[ctxpair] & ACTION0_MASK, EDB_REC actionScore1 );
+		db.readRec(records[ctxpair] & ACTION1_MASK, EDB_REC actionScore2 );
+		db.readRec(records[ctxpair] & ACTION2_MASK, EDB_REC actionScore3 );
+		db.readRec(records[ctxpair] & ACTION3_MASK, EDB_REC actionScore4 );
 
 		maxScore = actionScore1;
 		if(maxScore > actionScore2.score) {

			break;
	}

	actionScore = epsilon_select(ctxpair, 10);
	switch(actionScore.action) {
		case 0: // Drive forward, turn around, drive back

#define UNKNOWN 0b0100

// limit ourselves to possibly four actions for a given context pair
#define ACTION0_MASK   0b1111000000000000
#define ACTION1_MASK   0b0000111100000000
#define ACTION2_MASK   0b0000000011110000
#define ACTION3_MASK   0b0000000000001111

//int lookups[256];
//lookups[0b00101010] = 0b0011110111001001;
