Corn plants chosen with the help of computers are growing in the U.S. this year, and algorithms are sifting North American weather data to anticipate crop threats such as pests and disease. Agricultural giants like Monsanto and BASF are teaching machines how to farm.