Unlike in the States, cigarette machines are everywhere in Japan. Rather than get rid of them due to the problem of underage kids being able to buy packs of smokes from them like we did here, they're using technology to keep the machines around and ensure that only adults can make purchases from them.
A new machine is in development that will have facial-recognition software built in to gauge the age of wannabe purchasers. If they have a young-looking face, it'll require photo ID, which it will then compare with your actual face to determine if it's legit. It's a pretty clever and sophisticated system, one that's clearly way more expensive than just forcing people to go deal with a human being at a convenience store but much more convenient for the many smokers of Japan.