This is a platform installed near public parks - or in other other public place where dog excrement is causing problems.
1. Dog walks onto the platform
2. Dog's weight is stored in the computer
3. Dog urinates or deficates into a separate platform
4. The weight of dog's excrement is stored
in the computer
5. The computer calculates the amount of treats to give the dog as a reward. Higher ratio of excrement weight to dog weight is rewarded.
6. The treat dispensor gives the dog the treat and the computer says: "good boy/girl ... see you soon"
Note: The computer also has an anti-cheating algorithm since some of the smarter/rebelious dogs may cheat and ask their dog friend to stand on the excrement weight scale instead of urinating into it. Without such countermeasures the dispensor would go into a "jackpot" condition and incorrectly empty 2 months worth of treats in one session. On top of that, I'm pretty sure these dogs will urinate right next to the pristine grass next to the machine just for the heck of it.
I'm sure there are more ways to hack this (think: division by 0 gives infinite treats). But we'll make it secure in a throrough code review before it goes live.
See image.