Lightweight Reinforcement Learning for Energy Efficient Communications in Wireless Sensor Networks