This paper describes a novel strategy based on random forests and reinforcement learning for improving sensor placement and organizing an optimal network topology for capturing carbon flux and related measurements in complex sub-alpine terrain at the Niwot Ridge site near Boulder, CO. The approach consists of two facets. First, a machine learning algorithm is used to learn statistical relationships between the various sensors as data are collected. The strengths of these relationships are then used to diagnose regions of unpredictability where additional sensors should be deployed or current sensors should report more frequently to better measure the processes of interest. Second, reinforcement learning techniques are used to optimize the sensor reporting and network routing strategy based on recorded network activity, battery usage, and an assessment of each sensor's value. These operational parameters are re-learned nightly and transmitted to the sensor network nodes to improve future network reporting performance and power usage balance. The proposed technique is demonstrated using simulated data, and may be utilized in a planned wireless sensor array deployment in the summer of 2007.