this post was submitted on 18 Jul 2023
46 points (100.0% liked)

Ask Lemmy

27040 readers
1874 users here now

A Fediverse community for open-ended, thought provoking questions

Please don't post about US Politics. If you need to do this, try [email protected]


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either [email protected] or [email protected]. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email [email protected]. For other questions check our partnered communities list, or use the search function.


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 1 year ago
MODERATORS
 

I need too build one for school, I figure this would be a way to brainstorm

you are viewing a single comment's thread
view the rest of the comments
[–] CrunchyBoy 25 points 1 year ago (3 children)

Pizza Peacemaker. If you're with a bunch of people with varying tastes and want to order pizza, you open the app and pass your phone around. Each person in turn puts in what they like and how much they want to eat. At the end the app tells you what you should order and how you should split the bill.

[–] ianonavy 3 points 1 year ago

I made a web app like this long ago! https://how2pizza.com, you could send a link out in advance of an event and then people could suggest types of pizza and vote for all the ones they liked. After all the votes, the organizer would decide how many people per pizza, and the app would tell you what to order.

The algorithm was designed to balance popular options with the needs of those with dietary restrictions. It recognizes that some folks only have a few menu options they can actually eat, and it guarantees they won’t get stuck with cheese. The way it worked is the “pickiest” people (i.e. those who only voted for one or two types of non-cheese pizza) would be guaranteed a pizza they can eat first. If the individual voted for more than one type, then the more popular option is favored. Cheese was a special case and there was logic to make sure it was only chosen after everyone got a slice of something they specifically wanted.

We used it a bunch in university for club events and stuff, and it worked great. Hopefully this is helpful and a good inspiration. Be warned about the code quality—the all hasn’t been updated in 8 years old!

If you’re curious, the main algorithm can be found here: https://github.com/ianonavy/how2pizza/blob/master/how2pizza/pizza/static/main.js

load more comments (2 replies)