Quantcast
Channel: Dollar Bill Auction - Code Golf Stack Exchange
Browsing index pages (31 articles)

Dollar Bill Auction

This is a KOTH challenge for the dollar bill auction game in game theory. In it, a dollar is being sold to the highest bidder. Bids go up in increments of 5¢, and the loser also pays their bid. The...

View Article


Answer by Kevin Cruijssen for Dollar Bill Auction

BreakEvenAsapimport net.ramenchef.dollarauction.DollarBidder;public class BreakEvenAsap extends DollarBidder{ @Override public int nextBid(int opponentsBid){ // If the opponent has bid 100 or more: bid...

View Article


Answer by AdmBorkBork for Dollar Bill Auction

BorkBorkBotimport net.ramenchef.dollarauction.DollarBidder;public class BorkBorkBot extends DollarBidder{ @Override public int nextBid(int opponentsBid){ return (opponentsBid >= 95) ? 0 :...

View Article

Answer by user48543 for Dollar Bill Auction

TargetValueBotimport java.util.Random;import net.ramenchef.dollarauction.DollarBidder;public class TargetValueBot extends DollarBidder { private int target; @Override public void newAuction(Class<?...

View Article

Answer by histocrat for Dollar Bill Auction

DeterrentBotimport net.ramenchef.dollarauction.DollarBidder;public class DeterrentBot extends DollarBidder { @Override public int nextBid(int opponentsBid) { return opponentsBid > 5 ? 100 :...

View Article


Answer by Kevin Cruijssen for Dollar Bill Auction

UpTo200import net.ramenchef.dollarauction.DollarBidder;public class UpTo200 extends DollarBidder{ @Override public int nextBid(int opponentsBid){ // If the current bid of the opponent is in the range...

View Article

Answer by Silvio Mayolo for Dollar Bill Auction

LuckyDiceBotLuckyDiceBot only trusts his dice. He rolls two dice, adds the sum to the current bidder's value, and bids that much. If it's not enough to overcome the opponent's bid, he cuts his losses...

View Article

Answer by anna328p for Dollar Bill Auction

AnalystOptimizerimport net.ramenchef.dollarauction.DollarBidder;public class AnalystOptimizer extends DollarBidder{ private DollarBidder enemy; @Override public void newAuction(Class<? extends...

View Article


Answer by anna328p for Dollar Bill Auction

MirrorBotMakes the enemy play against itself.import net.ramenchef.dollarauction.DollarBidder;public class MirrorBot extends DollarBidder{ private DollarBidder enemy; @Override public void...

View Article


Answer by Nissa for Dollar Bill Auction

DeterredBotimport net.ramenchef.dollarauction.DollarBidder;public class DeterredBot extends DollarBidder { private int deterrence; public void newAuction(Class<? extends DollarBidder> opponent) {...

View Article

Answer by Silvio Mayolo for Dollar Bill Auction

InsiderTradingBotIn the spirit of @StephenLeppik's answer, InsiderTradingBot knows all of his opponents and understands their strategies. Your move, Stephen.import...

View Article

Answer by Nissa for Dollar Bill Auction

MimicBotimport net.ramenchef.dollarauction.DollarBidder;import java.util.Set;import java.util.HashSet;public class MimicBot extends AbstractAnalystCounterBot { private final Set<Class<? extends...

View Article

Answer by Insanity for Dollar Bill Auction

Darth Vaderimport java.lang.reflect.Field;import net.ramenchef.dollarauction.DollarBidder;public class DarthVader extends DollarBidder{@Overridepublic void newAuction(Class<? extends...

View Article


Answer by Neil for Dollar Bill Auction

RandBotimport net.ramenchef.dollarauction.DollarBidder;import java.util.concurrent.ThreadLocalRandom;public class RandBot extends DollarBidder { @Override public int nextBid(int opponentsBid) { return...

View Article

Answer by Qaghan for Dollar Bill Auction

MarginalBotimport net.ramenchef.dollarauction.DollarBidder;public class MarginalBot extends DollarBidder { private DollarBidder rival; @Override public void newAuction(Class<? extends...

View Article


Answer by Kevin Cruijssen for Dollar Bill Auction

CounterBotimport net.ramenchef.dollarauction.DollarBidder;public class CounterBot extends DollarBidder { private Class<? extends DollarBidder> enemy; @Override public void newAuction(Class<?...

View Article

Answer by Nissa for Dollar Bill Auction

Non-competing: AbstractAnalystCounterBotimport net.ramenchef.dollarauction.DollarBidder;import java.util.Set;import java.util.HashSet;public abstract class AbstractAnalystCounterBot extends...

View Article


Answer by RamenChef for Dollar Bill Auction

ImprovedAnalystBot (non-competing)A lot of people seem to be using the AnalystBot code as a template, even though it's deliberately bad code. So I'm making a better template.import...

View Article

Answer by user48543 for Dollar Bill Auction

RiskRewardBotimport net.ramenchef.dollarauction.DollarBidder;public class RiskRewardBot extends DollarBidder { private int target; @Override public void newAuction(Class<? extends DollarBidder>...

View Article

Answer by ripkoops for Dollar Bill Auction

BuzzardBotimport java.util.Random;import net.ramenchef.dollarauction.DollarBidder;public class BuzzardBot extends DollarBidder { private int[] bids = new int[100]; private int oppFlag = 0; public void...

View Article
Browsing index pages (31 articles)


Latest Images