One of the biggest advances in this early stage of working artificial intelligence is facial recognition — the ability of Facebook to pick out individuals across its platform, and the Chinese to nab suspected criminals out of a city crowd.

But last year, engineers working for JD Finance, the financial arm of JD.com, the e-commerce giant, wondered where such capabilities could go next. What about animals? So it was that a contest unfolded: three teams of engineers pitted against one another to adapt facial recognition programs to piglets.

How will the winner be selected?

As a first stage, each team must show it can identify individual pigs, says Chris Yao, a vice president of strategy for the JD.com affiliate, speaking over lunch Monday with a small group of journalists.

each team must show it can identify individual pigs, says Chris Yao, a vice president of strategy for the JD.com affiliate, speaking over lunch Monday with a small group of journalists. Then, they must do so over time — after all, as with humans, a piglet's facial appearance evolves as it grows up.

This isn't entirely a lark: The pig inquiry has its roots in a prior JD Finance study of chickens that resulted in a way to systemize feed costs for a full-size bird.