changed to minimax based reward calculation
merged all but bfb.c
merged bfb.c