7:00 – 6:30 ASRC Research
- Probably not going to get the StorageAndRetreival class done and integrated by Sept 1, so I’ll need to work out the paper based on what I have. But let’s see how far we get…
- I think I’m going to start simply by placing the agent type in the IR cell and color accordingly. There will be three states, NULL (white) , EXPLORE (red) and EXPLOIT (green)
- Fixing some things along the way. Stage dimension initial size was hard coded. Oops.
- Adding a clear() to LabeledTensor and StorageAndRetreival
- Working out how to recurse though a set of arrays. Putting here for later reference:
class Recurse{ int linecount = 0; boolean fillMat(int[] curIndices, int[] maxIndices, int curIndex){ if(curIndex > curIndices.length-1){ //System.out.printf("curIndex(%d) > %d\n", curIndex, curIndices.length-1); return true; } for(int i = 0; i < maxIndices[curIndex]; ++i) { curIndices[curIndex] = i; boolean done = fillMat(curIndices, maxIndices, curIndex+1); if(done) { linecount++; System.out.println(linecount+" [" + curIndex + "]: " + Arrays.toString(curIndices) + " = " + done); } } return false; } public static void main(String[] args){ int[] initial = {0, 0, 0}; int[] max = {3, 3, 3}; System.out.println("Recurse!"); Recurse r = new Recurse(); r.fillMat(initial, max, 0); } }
- Here’s the final version, with an Interface callback
public boolean fillTensor(int[] curIndices, int[] maxIndices, int curIndex, TensorCellEvaluator tce){ if(curIndex > curIndices.length-1){ // if we get here, we're done return true; } for(int i = 0; i < maxIndices[curIndex]; ++i) { curIndices[curIndex] = i; boolean done = fillTensor(curIndices, maxIndices, curIndex+1, tce); if(done) { tce.evaluate(curIndices, lt); } } // if we get here, we're not none, keep going return false; }
- Here’s the call with the implemented interface. It doesn’t do anything yet, but the pieces all work
stoRet.fillTensor(indicies, maxIndicies, 0, new TensorCellEvaluator() { @Override public String evaluate(int[] indicies, LabeledTensor lt) { System.out.println(Arrays.toString(indicies)); return Arrays.toString(indicies); } });
- Interview with USDA team. Not a fit at all