##Python (2.6) Extremely simple, but still I'm curious how it will perform compared to the other approaches. import sys, random try: s = sys.stdin.readlines()[-2] m = min(int(x) for x in s.split()) except IndexError: m = random.choice([1,1,1,2,2,3]) a = random.choice([-2,-1,0,1,1,2]) print max(m + a, 1) Just pipe in the bids via stdin, e.g. `python testbid.py < bids.txt`. *EDIT*: changed for the 'first round all zeros' *EDIT*: changed the 'magic numbers' a bit.