A novel algorithm for enhanced crop productivity