 This paper proposes a novel architecture for controlling a proton exchange membrane fuel cell, PMFC, under optimal humidification conditions. The architecture consists of two layers, a perception layer and a decision making layer. The perception layer uses sensors to collect data about the state of the PMFC, while the decision making layer uses heuristics to make decisions about how to optimize the performance of the PMFC. This architecture was tested successfully with different power outputs from the PMFC, ranging from dry to flooded. This article was offered by Abel Rubio, Wilton Ogula, Leandro Gonzales and others.