Miscellaneous/Multi-Purpose Mafia I - Page 54
Forum Index > TL Mafia |
Clarity_nl
Netherlands6826 Posts
| ||
gonzaw
Uruguay4911 Posts
On September 17 2013 07:40 Clarity_nl wrote: I am definitely out of my depth in this topic and will probably sound like an idiot for even talking about it but let me give it a try. I understand that having an account that just posts votecounts every 3 hours is likely not even possible on TL, but a program that just spits out a formatted votecount with the press of a button doesn't seem too farfetched? I've noticed that small threads have an "all" button next to the page buttons, to display it all. All this does is add "&view=all" to the link, and when I do this for bigger threads it tells me I need TL+ for that function. So perhaps it would be possible to enable that for all users just in the mafia subforum (like filters). Given that that option is available (or simply using a voting thread, they dont tend to go big), surely a program that's not too complex could filter out voting formatting and turn that into a votecount post that can be copy pasted by a host or cohost? Again, I'm probably being the guy that says "if I can balance my checkbook why can't the US balance their budget" when obviously I'm simplifying everything, but I'm curious. But there is something like that. That ZBot thing Zona did in Purgatory Mafia does exactly that. However it's a "botched up" solution in my mind. It only addresses votecounts, and it must "crawl" through the page. I.e it must download the page, know the semantics of the HTML, and navigate between pages and get the necessary data. I don't like this, because the second TL slightly changes its format, the bot stops working. On September 17 2013 07:49 Blazinghand wrote: It wouldn't be that hard to take like a normal forum crawling bot and hook it up to some regex stuff that looks for literally ##vote: it can parse that and put it in a list, then print it in a formatted way pretty easily you'd want to use a voting thread link like this http://www.teamliquid.net/forum/viewmessage.php?topic_id=420228&view=all and then probably the hardest part would be making sure that it grabs stuff from within the text boxes and not a thread titled ##vote but yeah I mean if someone can make a program that's capable of downloading a webpage and handing something over to a python script I could probably just use regular expressions and sikuli to parse the info and print it into some kind of human-readable format, then paste it into the textbox and hit post i'm so lazy though so lazyyyy The parse is not difficult per se. Just see the page source, check out the tags in which the votes are made, then get all the text in the page, and check if it's a vote or not. Then get the next page, do the same. But...yeah it's tedious. Specially if people just do "##voteeee: lololololmarvymarvbabe" and you have to parse that shit into "Player X voted marvellosity" I did this in OMGUS, where you get a votecount by using a BBCode, and well it wasn't very nice (damn javascript). I guess the "difficult" part is getting the bot and shit (I have no idea where to get those or where to run those). But surely there are bots around, again like that ZBot. Ideally the "vote parse" should be integrated with the forum itself. This means it should be inside TL's web site code. Whenever there is a specific thread called "X Voting Thread", whenever a user makes a post with the text "##Vote: [..]" in it, it could get stored in a database of votes/players/games/etc. Then the bot would only query this database and that's it, he gets all the votes without having to traverse through HTML tags and doing HTTP requests. Even better, instead of a single database it could be a full-fledged server that runs on its own, and has a whole structure of games, users, players, votes, roles, etc so you can get anything whenever you want That's what I wanted to do...but alas it's not so easy (specially if you have like 0 resources and -1 free time). | ||
strongandbig
United States4858 Posts
| ||
iGrok
United States5142 Posts
On September 17 2013 08:42 strongandbig wrote: What if two bus drivers each bus the other one with the same target? Then they're bussing themselves but that's banned! Not in my games its not. | ||
gonzaw
Uruguay4911 Posts
On September 17 2013 05:28 iGrok wrote: So lets take things one at a time. 1) What is bussing? The most important thing here is to know the busdriver ability: You may bus two players, causing any actions that would affect one to affect the other instead. Well yeah. But that doesn't state anything regarding "priorities" with other bus drivers and RBers, or anything else. 2) Multiple Busses When multiple Busdrivers are involved, there are three choices. Either all busses are non-interactive with each other, physics fail, or you simplify. non-interactive busses lead to daisy chains pretty quickly, especially in games where we have future busdrivers and shit like that - you have 1 mafia kill hitting 3 people and making the game swing way out of balance. Physics fail, while amusing that one time, is a horrid explanation. My method of simplifying the swaps is the happy medium - we still get busses, there are no daisy chains, and nobody's ability is cancelled because it made things too confusing. In a perfect world there'd be a 4th option, where busses are non-interactive in the general sense, but when the need arises there are specific rules to how they must be applied that 100% determine any interaction of busses with every other role and everybody is happy forever and ever and evah. 3) Priority No two roles which could possibly interfere with each other share the same priority level. Bus Drivers are pretty high on the list, for the most part only below roles which change the target (as opposed to moving the target player). Redirecters, Mind control, etc fall into this category. Roleblockers are a special case in many regards, but mostly because Roleblockers have two priority levels. Roleblockers are both First priority and Post-Movement. Any roleblock which would prevent a Control or Movement role occurs first. Then the Control/Movement roles happen, following their priority. Then all other roleblocks (Anti-Action RBs) occur, followed by all other actions (in whatever priority they have). By the way, the difference between Control and Movement roles are whether target is used as an adjective or a noun. Mind Control changes the target(adj.), while Bussing changes the target(n.) You lost me there. How can "target" be an adjective? Maybe I'm missing something lol 4) That is a complex problem, but not one without a solution. Here is my answer. ![]() I've now been up for ~ 30 hours so I might not be the most coherent but i'm doing my best. Yeah that isn't very satisfying ![]() It seems to me for every "complex" scenario you have to create some ad hoc conclusion to it. You could have easily said "noone is bussed" and it would be valid as well. And how about this: 6 players: A B C D E F These are the busses: AB AC AD AE AF CD CF DF Again, every node is "odd", no repeated busses. The more "complex" you get, the more you have to create ad hoc stuff and just say "well, I just say it works like this because magic". ...also I fully expect you guys to create a 10-busdriver mafia game soon ![]() | ||
GreYMisT
United States6736 Posts
| ||
AxleGreaser
Australia1154 Posts
On September 17 2013 02:55 gonzaw wrote: Also, entertain this example and tell me what happens iGrok: There are 4 players, A, B, C and D. Busses are AB, AC, AD What happens? There are 4 odd "endpoints", yet no repeated busses. I too went to sleep and while not breaking my brain it did break my sleep. I had nightmare. It was Gonzaws Dilemma + Show Spoiler + (Damn I should I got up last night ah well gonzaw has priority. Ah well I wills settle for Axles Wheel (see next post!)+ Show Spoiler + It requires 12 bus drivers.... There are 4 players, A, B, C and D. Busses are AB, AC, AD What happens? There are 4 odd "endpoints", yet no repeated busses. This is the smallest problem for which despite apparent belief there is as a truth no real solution. If instead of Igroks square picture, you draw it with A in the middle of an equilateral triangle the intractability of the problem becomes immediate and obvious. Not only are there no repeats, no closed loops (sequences of drives that could be cancelled). (Symmetry is the bane of bus driver solution problem see next post if you are silly) The problem itself is perfectly symmetric. By relabelling (Igroks picture) ![]() and swapping the location of either B or C with D then the red blue yellow lines are still correct representations of bus driving that happened and the green lines now resolve as A swaps with any one of B,C,D and the remaining two swap. It is not possible to resolve this bus driving scenario without providing some kind of default driver order that is used when all else fails. [triangle bus driver image coming] All 3 pairs of bus driver outcomes are exactly equally reasonable interpretations. AB { AC { AD { } } } = BC { AD { } } = BC & AD { } AB { AD { AC { } } } = BD { AC { } } = BD & AC { } AD { AC { AB { } } } = DC { AB { } } = DC & AB { } other orders with first two swapped produce the same result. My best solution as before is to fall back to the previously solved problem, if there are that many bus drivers, it is an Igrok game, Igrok knows what happened wait for the day post. There are some things you really don't want to think about. | ||
gonzaw
Uruguay4911 Posts
| ||
AxleGreaser
Australia1154 Posts
On September 17 2013 10:38 gonzaw wrote: oh shit i broke mafia Well, that is in fact a real problem one who has the knowledge to do so must be careful of. But in this case breaking bus driving is not that big a deal, as the answer "Igrok knows the solution" is already acceptable, for anyone that chooses to play in an N bus driver game. (this is now not the next post...that the previous post refers to ... ahh work it out for yourself.) | ||
AxleGreaser
Australia1154 Posts
Axles Bus Driver 'Wheel' Consider this set of player targets A,B,C,D, a,b,c,d, and this set of actions. 12 Bus drivers.... AB{} BC{} CD{} DA{} ab{} bc{} cd{} de{} Aa{} Bb{} Cc{} Dd{} .... There are again more than one set of plausible resolutions depending on which to drive loops are cancelled. + Show Spoiler [aside] + As matter of interested my scenario for this is three quadruple bus driving players X,Y,Z each send in four bus driving actions. (X : AB{} CD{} bc{} ad{} ) (Y: BC{} AD{} ab{} cd{} ) (Z: Aa{} Bb{} Cc{} Dd{}) + Show Spoiler + Easter Egg: While it might be appealing to envision 4 quadruple actions more like Z, I like this set. + Show Spoiler [Wheel Image] + ![]() + Show Spoiler [Some possible Answers] + If you cancel out the <ABba> and the <CDdc> Bus drive Loops as do nothing that leaves 4 pair swaps. If you cancel out the <BCcb> and the <DAad> Bus drive Loops as do nothing that also leaves 4 pair swaps. There are 7 more solutions of possible cancellations that all result in 4 left over pair swaps. + Show Spoiler + Yes i do know the other name for the Wheel. + Show Spoiler + shhh When this post is finished it will discuss various algorithms and heuristics that by use of canonical form reduce many seemingly bleh yuck, bus drive scenarios uniquely into one set of actions. They don't and cannot possibly work in all cases (see Gonzaws dilemma) they do however produce what humans resolving it might regard as the aesthetically pleasing results, of Igroks original post and do so in a prescriptive repeatable transferable to other hosts manner. + Show Spoiler + One of these heuristics is that if it is possible for set of bus drivings to produce a zero effect ( BC{} CD{} DB{} ) they do. While wondering what it would take to wind up with a scenario where which order the multiple zero effect loops were deleted changed the result I found the Wheel' resolve, the actions in a non arbitrary way. In the broad sense it is important to note that there exist more than one possible reality basis for the resolution of N Bus drivers. The choice is probably best made by which makes the game in question the most fun. The Many Worlds interpretation of Bus Driving + Show Spoiler [There be Dragons...] + + Show Spoiler + This is taking serious liberties with physics many worlds hypothesis, but I like it as a name in some sense in this interpretation of multiple bus drivers everything that can possibly happen does. In Gonzaws Dilemma 3 people are all bus driven with A: vis: AB{} AC{} AD{} + Show Spoiler [Game Scenario] + This could realistically happen if A is clearly the stand out player and uber obv N1 kill and 3 townies protect them by bus driving them... + Show Spoiler + Where I can I will describe the real world scenarios where the situation could occur in real game as some things such as Axles Bus Driving Wheel, are just to absurdly unlikely to happen to be considered?+ Show Spoiler + (BTW I do know the uber obv N1 kill would probably get lynched instead.) Quantum mechanical Bus Drivers. In Gonzaws Dilemma 3 people are all bus driven with A AB{} AC{} AD{} Instead of all three actions happening in some sense of sequence, where Bus driver AB rewrites what bus driver AC does, producing BC{} as the single effect of both combined. What if all three have equal priority and all happen!!! With Quantum mechanical Bus drivers What happens if location A is now shot. As B C nd D have all been driven to where A was they all get shot option 1: This kills all three. option 2: Each is delivered 1/3 of the KP aimed at where A was... What happens if any one of B C or D are shot? option 1: A is delivered 1 KP... (note this might be mandated by the law of conservation of KP if your universe has one...) option 2: A is delivered 1/3 KP... (but where does the other 2/3 go? Nowhere or ....? ) option 3: As A is superimposed wave state with all three of B,C,D. A receives 1/3KP and which ever one was targeted receives 2/3 of the KP aimed at player A who is in their former location... (err um maybe I said what i meant.) Quantum Mechanical Bus Drivers are probably a bad thing(tm). Even though I suspect it could be hammered down to have no ambiguities, that is not the only criteria. However mafia is a nutty game, I am sure someone could theme a game where fractional KP makes sense and implement quantum mechanical bus drivers.... That it could plausibly take the players longer after the game to work out what happened than they spent playing the game.. is :\; hence the bad thing(tm) estimate. The Classical Physics interpretation of Bus Driving In a classical physics interpretation, bus driving and passengers are physical indivisible entities. When multiple Bus Driving occurs every person winds up in exactly one slot/location. Any action targeted at the person who used to be in that slot applies to exactly one person. I have found two interpretations that fit this. Option 1: (This is the Not_IGrok interpretation) (pretty sure its the Bh one below expressed differently) Does AB { } AC { } have the effect that. Each in turn operates on the player LIST and swaps players around. AB { } swaps A and B, and all future actions operate on the swapped people. A is targeted by action on B && B is targeted by action on A(for now) Then AC { } tries to swap A and C but B is where A was and is targeted instead. Thus B is swapped to C and C is swapped to 'location A'. (For a linear sequence of swaps this produces cyclical patterns of player swaps) (see BH post below) Result: For things such as vigis who resolve later.. B is targeted by action on A && A is targeted by action on C && C is targeted by action on B There is very real sense in which you can wonder why under the IGrok interpretation A is not moved at all. Option 2: (This is the IGrok interpretation or its equivalent IMO) Does AB { } AC { } have the effect that. Each in turn operates on future actions, and specifically operates on subsequent Bus drives by rewriting them. The AB{} action modifies the BC{} action by changing the BC{} targeting to be AC{}. Although i just evaluated that sequentially both orders for trivial cases give the same answer. Under this interpretation, sequences of bus drives in which all the middle players have even numbers of bus drive operations, leave only the end points swapped. A physical interpretation of this, is that each Bus drive action creates the leg of a bus route. Once all the legs exist it creates an 'undirected graph' of bus trips. The graph is then resolved into some number of larger bus trips. Ambiguities are solved by some other heuristic. Igroks interpretations of his graphs has (to date) adhered the following aesthetics. The final result of bus driving is a certain number of discreet pair swaps, always pair swaps, never 3 loops. Anyone acted on by an even number of bus drivers never moves. Apart from problems like Gonzaws Dilemma. The only problem is deciding which set of closed do nothing bus trips and actual bus trips (pair swaps) happened. Sometimes there are multiple interpretations. Earlier IGrok gave his answer to this bus drive scenario. There are in fact two interpretations of AD AC AC BC, if the order is varied. AC {AD { BC { AC { } } } } = CD { BC { AC { } } = BD { AC {} } = BD && AC { } both this and IGoks answer of AD && BC both account for all the bus drives. To make IGroks answer the canonical interpretation of the undirected graph, you prioritise interpreting any combination of bus drives that produce no effect as producing no effect. Indeed the effect of IGrok interpretations is to minimise the total impact that having N bus drivers have on the rest of the game. Thus allowing you to maximise the number of bus drivers while minimizing the mischief it causes to the setup. (note the Axles Wheel scenario provides one example where even cancelling is ambiguous) Other heuristics might also be useful. If after cancelling any do nothing loops that are possible, there are still choices (most probably a variant of Gonzaws Dilemma, you might choose longest bus trip goes first. (but I think that unlikely to be useful often, in practice) A more useful heuristic, That is only little arbitrary is to predefine an ordering of players (eg perceived skill?) give them(least skillful) the longest bus trips possible (to the best players in case of ties) (after loop cancellation). What this achieves is it makes the bus driving that happens to the best players most likely to be knowable by players. Why? Because it gets one unique solution? Messes with the game least per Bus driver and as everyone knows the game should be optimized to have the maximum possible number of bus drivers?.... Umm err because Penguins. @everyone Just to be clear. TLDR: In case it is not clear, I endorse Igroks interpretations and resolution of as being the least insanity generating methods. While my opinion is in my opinion moot, I just want to be clear what it does not mean. As stated originally I already have the perfect solution for resolving what happens in an N bus driver game wait for Igroks day post. LOL. Play on. Another important thing to note, most of the gnarly to resolve bus driving scenarios are statistically speaking unlikely to occur, if people submit random actions. Which is surprisingly accurate model. Three people all driving the one good NK N1 is the main case I can see where there is some plausible possibility of it (ambiguity) occurring with any regularity. One solution is to on those nights simply RNG the solution for which of the possible Bus drivings happen. (other options exists too) Be aware sometimes its tricky to see how many solutions there are, Gonzaws dilemma has 3 different swaps that might occur. Axles Wheel has 9 (AFAIK). edit: Errata: + Show Spoiler + There are actually more than 9 possible results from a Axles Bus Driver Wheel, but as the extras (AFAIK) cancel fewer bus driver actions in circular loops, I find them aesthetically less pleasing, whereas the nine have very similar claims to being the one legitimate interpretation of the result of the 12 bus drive actions. | ||
gonzaw
Uruguay4911 Posts
It's like...we always think that, no matter how many busses there are between people...that there is always only ONE path in said bussing, where if you target A you instead target B, and viceversa. So if the chain is A-C-.....-D-B, we ONLY think of that chain as "if you target A, you instead target B and viceversa". But we never look at the shit in between. What about C? And what about D? What if there is someone else bussed with D? It doens't matter because that chain is still ONLY defined by A and B right? This way of understanding bussing is flawed because of that. We need to understand the "bus flow" or "bus channel" in another way, so even something like A-C-D(-E)-B has meaning, no matter which player you target. The bus channel should be defined for every targetting of any member of its channel, not just the 2 "obvious" endpoints The other way is...have no channel (for instance make each bus non-interactive with a specific set of rules). Or have a super-channel that we have to conceive in a different way At its most basic level, a bus channel determines a graph. When you target a player in that graph, you have to determine HOW to transverse that graph to end in a different player. If the basic graph alone doesn't solve this, you have other options, like: -Adding ponderations to each "link" -Adding ponderations to each node/target -Use said ponderations in a way to determine the "path" you will take, which will determine the player you will target. How to add these ponderations I don't know, since there is little semantic meaning in any of that shit when just talking about bus driving, but we could try | ||
Blazinghand
![]()
United States25550 Posts
night actions directed at A get redirected to B. night actions directed at B first get redirected to A, then to C night actions directed at C first get redirected to A, then to D night actions directed at D get redirected to A seems simple enough | ||
Ace
United States16096 Posts
| ||
gonzaw
Uruguay4911 Posts
If I bus player A and B, and someone else busses player B and C, who is to say my bus has priority over his, or viceversa? The two actions are equally dependent on each other, there is no priority. FUCKING LOOPS MAN | ||
iGrok
United States5142 Posts
I would also like to state that my solution for A{BCD} was done with no sleep whatsoever, and I know think it is bad. And finally, that if there are 3 busdrivers in a game, there need to be other things granting priority. "Target" as different parts of speech. Hopefully that will helps you understand my 3rd point - that was the most important one I think, because it explains your first question as well. I need to think about this some more, and do a little playing with reflocs. hmm... | ||
gonzaw
Uruguay4911 Posts
On September 17 2013 14:08 Ace wrote: just stop using roles that redirect actions? hurr durr But then where's the fun? | ||
ObviousOne
United States3704 Posts
The scum hunting, perhaps. ##ACE-d | ||
DarthPunk
Australia10847 Posts
^ this. | ||
Meapak_Ziphh
United States6784 Posts
| ||
AxleGreaser
Australia1154 Posts
This was always what i thought the point of playing Mafia was. However there are lots of kinds of fun and analyzing Bus Driving was fun for weird values of fun. Also as per normal, if the above posts of mine are wat and you want to, and think its good idea to understand you can ask, or draw lots of your own pictures, or ... but I really do think its most fun to work it out. | ||
| ||