Hacker News new | past | comments | ask | show | jobs | submit login

> The typical ways that folks - especially folks who don’t program - bump into bots are things like ticket scalping and restaurant reservation bots. Bots that feel selfish and unfair and antisocial.

This reminded me of how a ski resort, Palisades Tahoe, implemented free but scarce parking reservations for weekend parking last winter. Since it's one of the most popular ski destinations from the Bay Area, you can imagine that bots were written. Every time new spots would "drop" (become available for the following weekend) I think on Tuesdays and Fridays or something like that, they'd be gone in seconds. Clearly bots! So naturally I had no choice but to write one. It just alerted me (via Pushover) when cancelations would lead to open slots, it didn't actually reserve spots on its own, but that was good enough to get the job done for me and my crew.

Several Reddit threads had non-bot-writers discussing that bots must be slurping everything up. I felt so antisocial, but really had no choice.




It's a shame because the solution is very simple. You have a period of time where people can register interest which is long enough that everyone can do it at their leisure. After this window closes you draw lots. Whoever wins the lottery gets the opportunity to buy (eg by receiving an email with a magic link). If they don't, you draw another person and offer it to them.

Otherwise you have an "auction" where instead of giving the resource to the people willing to pay the most, you give it to the people with the best programming skills (who then turn around and flip it to the people willing to pay the most). Which is pretty unfair, since programming is a specialty, and since presumably we're in a context where giving it to the people who pay the most isn't considered acceptable (or we would just hold an auction).

I believe this is used in parts of the sneaker/fashion industry.


That's good if there's something to buy, but in my scenario it's free. The resort's goal isn't to charge for this parking, it's to ensure that the number of vehicles on the roads leading to their parking lot doesn't exceed the number of parking spaces. So if they have N parking spaces, they allow N reservations to be made, but people are cautiously greedy and make a reservation (when the opportunity begins on the prior Tuesday) before they even know that they're planning to ski that weekend, leading to near-immediate depletion. If the weather isn't looking great, they'll eventually cancel their reservation (lest they get on the resort's no-show shit-list, which ultimately leads to the resort refusing your business -- you must cancel or be found to have parked) and those cancellations are what the bot alerts on.

How would a lottery work for this situation? Everyone thinking of maybe skiing signs up on Monday, then on Tuesday an email is sent to N people saying "you won the parking lottery," then someone canceling last-minute (to avoid the no-show penalty) causes another "you won" email to go out randomly to the wait list? What if the person on the wait list doesn't see that they've won at the last minute, do they get a penalty for not having proactively removed themselves from the wait list upon deciding to ignore email the rest of the week? I guess this could work, but it's pretty dicey...


It works the same, the price is just $0. I'm sure I'm missing nuances since I don't know this resort's business, but here's what I'd propose.

You let people register interest by Monday (potentially weeks in advance). You draw N lots on Tuesday. People get an email, they have the option to reserve a space and 24 hours to exercise it. M people do so. On Wednesday you draw N - M lots. You keep going until either you've assigned all the spaces or you've run out of time.

People will still exercise a greedy strategy, and they might cancel their interest ahead of time, but if the lottery hasn't started that's a free operation. If they click the link and indicate they aren't interested any longer, we can offer the spot to someone else immediately. If they never click the link, then it gets bumped to Wednesday. Hopefully that's tolerable.

How far you may register in advance and how long you have to exercise your option are variables that you can tune. If you're getting overwhelmed and failing to assign spaces, you reduce one or the other.

Last minute cancellations or spots that people repeatedly failed to click the link for, need to be assigned ASAP to avoid a dead weight loss; for these, you can fail back to the old system. Maybe you email everyone who hadn't gotten a space, and the first to click the link wins. If that were the edge case instead of the norm, it probably wouldn't be a big deal to give it to the bot folk. At that point, they're playing an important role in making this market efficient, the sort of HFTs of the ski resort.

Alternatively, you can do just one round and then go to first-to-click. That gives the people who aren't botting room to breathe, at least.

(After typing this all out though, I do see that this is conceptually simple but complex to implement.)


> What if the person on the wait list doesn't see that they've won at the last minute, do they get a penalty for not having proactively removed themselves from the wait list upon deciding to ignore email the rest of the week?

No, when you get the "you won a spot" email, you have to click to confirm. Probably it should be set up to give you 12-24 hours to do so, and if you don't, it draws a new person and sends them an email.

I was surprised to read your initial post about it being hard to get spots. I went four times this past season... though I think maybe only once on a weekend (in January), and it was easy to get a parking reservation. Maybe that was early enough in the season that people hadn't written many bots yet. Bummed that it's going to be a pain next season.


The deadline to cancel without penalty is 9am day-of. In reality people will cancel at all different times, but for this exercise of designing out enough of the stampede conditions, let's say the first cancellation occurs at 8:55am day-of. So now it sends the "you won" email -- maybe the recipient even knew they were at the top of the waitlist so they can anticipate this. They've only got 5 minutes of cancellation window themselves! There is no way of giving another 12-24 hours RSVP time.

Now here's where it gets interesting: this means a rational no-bot human ought to ignore the whole system until 9am day-of, at which point the greedy "just in case" reservations have all been canceled, so all reservations are real people, and the ridiculousness of the system has led enough people to find alternative transportation that plenty of spots are available for easy taking, right? If no-show penalties are enforced properly.

I was out there in early March and this consumed me for a few weeks leading up to it, but it was fun.


> After this window closes you draw lots.

Couldn't someone use a bot to register interest a million times so they have a much higher chance of winning the lot drawing?


IIRC they require that you submit your license plate number when you register for parking, so no, you could only register once per vehicle.


I wonder if you could register using all the plate numbers from a nearby car rental place, then try to rent the corresponding car if it gets chosen.


Rental cars actually add an interesting aspect to all of this: if you use a disposable (not also used to buy your ski pass) email address and the license plate of your rental car for a reservation, the resort will have no way to penalize you for being a no-show! Any attempt at collecting a fine, prohibiting future business, etc. would be against a useless email address and plate number that you don't reuse the next time you visit.

Also, once you've managed to get a reservation, the system allows you to modify the plate number on your reservation, presumably to allow for renting after reserving.


And you'll need to address this whichever approach you take. If you can't pin them down to an identity, you'll probably need to take a deposit.


Type many fake invalid license plates, and cancel them, freeing a spot at a time of your choice.


You don't need to cancel a reservation in order to convert it from a bogus plate number to your actual plate number. Changing your plate number is already permitted by the reservation system.


What stops you from sybil attacking the lottery and selling to highest bidder?


yeah it only works if you have some kind of ungameable unique id for each participant

if it's parking, you could conceivably make people enter their license plate number when they enter, which would allow you to detect duplicate entries, and is reasonably hard to game if you have some enforcement mechanism on the actual parking side of things


During Covid I was forced to write a bot just to sign up for swim lane reservations at our local pool. Spots opened up at midnight two calendar days before. Most folks looking to regularly swim at 7am don’t make it a habit of starting up to midnight, and all spots were always booked up by the time I would wake up at 6am. So I wrote myself a bot, which was surprisingly fun and effective!


I use a bot for booking overnight huts on the more popular hiking trails in my country. They become available for booking online at a fixed time each year and are all taken a few seconds later. Using a bot is the only reliable way to get one.

Amusingly there are news articles every year about whether or not people are using bots to book these huts and the operators always deny it vehemently. Whereas I know my bot is up against loads of other bots.


We used to run into the same issue booking camping spots in Massachusetts, which open many months in advance. I don't know what the situation is nowadays but it used to be very competitive, with spots vanishing in seconds after opening.

Amusingly, one camper family we came across said they manually register at the stroke of midnight, but they all do it together from like 6 computers in their house.


> the operators always deny it

I assume they deny knowing about bots. Nobody knows you're a dog, as the saying goes.


Out of curiosity, what tech do you reach for when building something like this?


For mine, I just used a $1/mo VPS with a cron job running a bash script that used curl to poll the parking system and determine if its response was interesting. I used "copy as cURL" from browser dev tools to find something usable (which incorporated a slightly fragile, but very long lived, session token corresponding to my "cart") and I actually had to use curl-impersonate [0] for Cloudflare bot detection to stay out of my way. And then curl to alert me via Pushover.

[0] https://github.com/lwthiker/curl-impersonate


Selenium


The government services booking system has received this treatment in some parts of some southern european countries. Organised groups have monopolised the system and go on to sell appointments.

It's an open secret that you can either battle the bots to try to get an appointment slot in 6 to 12 weeks, or you can pay 50€ to the right person and have one in a few days.


I had to do similar during the first summer of COVID to get my boat onto Lake Tahoe. Lake Tahoe (and most lakes in CA) requires boat inspections immediately prior to getting onto the water (mostly to prevent Quagga contamination). Those inspections had to be scheduled online during COVID, and there was similar supply & demand to what you describe for parking, so I wrote a bot that notified me (also via Pushover) when a slot became available.

Once I got the reservation I had to tow the boat 9 hours, praying the whole time I didn't have a drop of water on the boat, for which most inspectors will immediately fail you and send you away. The inspection crew there turned out to be pretty awesome though, and they actually washed my whole boat down with hot water which apparently kills any (baby? egg? idk) Quagga muscles.


It's so funny you mention this, I actually just launched something super similar today for the California DMV (as a Bay Area student). It checks for openings from cancellations and notifies people.

There's a special kind of magic that comes from meaningfully improving your life from software :)

(the project is https://dmvfilter.com if you want to check it out!)


I should write a bot for making a parking reservation at work too. At least if there's no-shows people get told off for it (I wonder if they get barred from the parking reservation if they really take the piss after that though).


At least you were actually using the parking spots for yourself and friends. Bots become truly problematic when they're used for reselling.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: