Algorithms and strategies for extracting optimal information from chemical sensing systems