The numbers, day by day
How this market works
Buyers
Every buyer has a top price for an apple and never pays more. A shopper wants one apple if the price is right. A must-have buyer needs one, so the top price is everything in their pocket. A pie shop buys in bulk, but only while the pie still earns its margin after paying for apples.
Each buyer looks at a few stands, picks the cheapest that still has apples, and compares it with a banana if there is a banana stand. They take the better deal or go home.
Stands
A stand cannot see what buyers would pay. It holds a price for three days, checks whether profit went up or down compared with the last price it tried, and keeps moving in the same direction or turns around. If it turned buyers away every day it raises the price; if nobody came it cuts.
A stand pays for each apple it sells plus a daily rent, and can only sell so many apples in a day.
The two textbook prices
One owner is the price that makes the most profit if a single owner set the price at every stand. Full competition is as low as rivalry can push it: the cost of an apple, or higher if the stands sell out before everyone is served.
Both are worked out from the settings alone. The simulation never sees them.