[suggestion] Gang modelling

(previously 'DEVELOPER') Private forum for registered community members. To register, please visit www.prison-architect.com/register.

Moderator: NBJeff

Great Magical Hat
level3
level3
Posts: 486
Joined: Thu Dec 15, 2005 4:57 pm
Location: Netherlands

Postby Great Magical Hat » Thu May 30, 2013 9:11 am

Yes it was. Clearer now?
AgentPaper
level2
level2
Posts: 124
Joined: Fri May 17, 2013 2:04 am

Postby AgentPaper » Thu May 30, 2013 9:53 am

I like the idea of gangs and more complex prisoner interaction, but modeling every single interaction between two prisoners whenever they meet is not really a feasible thing to be doing. It'll hog way too much resources for relatively little benefit. Instead, you'd be better off with a more simple and abstract method. For example:

Each prisoner has a "gang" value, which simply notes which gang the prisoner is a part of, including "no gang". When a prisoner enters a prison, they usually aren't part of any gang, but occasionally you'll get members of gangs that exist outside the prison.

Each time a prisoner has free time, and no pressing needs, they will attempt to meet up with the rest of their gang. This follows a few steps:

1) Am I in a gang?
If the prisoner is not in a gang, or if their gang has few or no other members, then there is a chance that they will start a new gang, or leave the gang they're currently in. When joining a gang, certain traits make them more likely to join certain gangs, such as race, type of crime, ideology/religion, temperament, etc. They also try to join gangs who's turf they're often in, IE if their cell block and the canteen closest to their cell belong to a certain gang, they'll almost certainly join that gang. If none of these factors apply, they will either join a gang at random, or more often simply not join a gang.

2) Where is my gang?
The prisoner will check to see if there is a meeting spot already set up for their gang. If there is, he goes there, otherwise, he attempts to create a meeting spot for the gang. When choosing a meeting spot, the prisoner will always choose a spot that's A) Not the current meeting spot of another gang, B) In their turf, if they have any turf, and C) In a common room, yard, or canteen.

3) What's the gang doing?
Once at least three members of the gang meet up, they'll start thinking up stuff to do. Usually, this just means hanging out, guarding their turf, maybe roughhousing a bit, maybe taunting or hazing the guards or other prisoners depending on how strong they're feeling. However, if enough gang members are present, and they're tough enough, the gang will often try to turn one or more rooms into their "turf". If it's neutral turf then this just means going there and hanging out long enough to change it into their turf. If the room they choose is the turf of another gang, they'll get into a fight with that gang. If they win, it becomes their turf, otherwise it stays the other gang's turf.


Speaking of turfs and rivals, each gang would also have a few attributes:

Turf: Each gang can control certain parts of the prison. Each room is either neutral (nobody's turf) or the turf of one gang or another. If a gang controls a room, other prisoners are allowed in that room unless they're part of a rival gang, though the owners of that turf may give them trouble from time to time. Guards being present makes this less likely, however, so for example if a canteen is one gang's turf, you can station a bunch of guards there to keep them from attacking rival members that need to eat there. It's still no guarantee, though, and fights can still rarely break out even with heavy guard presence.

Rival: Whenever a member of one gang injures a member of another gang, or when one gang takes turf from another gang, the gang on the receiving end will get a "revenge" value towards the other gang. Basically, this means that they feel they owe the other gang violence as payback for violence done to them. This makes them much more likely to attack the gang they feel they owe vengeance to. Revenge is reduced whenever the gang successfully injures members of or takes turf from the other gang, though of course this starts a vicious cycle of revenge and counter-revenge until they're in a blood feud. However, revenge also goes down slowly over time, so if you can keep the two gangs from carrying out their revenge for long enough, they'll eventually settle down.
Jacq
level1
level1
Posts: 36
Joined: Fri Jul 13, 2012 5:59 pm

Postby Jacq » Thu May 30, 2013 4:41 pm

Hmm not sure I would agree with the "gangs are just friends" philosophy. From those documentaries and semi-realistic films I have watched its more of a fear based society aka "Do this or else..." where the strongest people supress the weaker ones. Maybe sort of like a pack of wolfes. There is an alpha wolf, and it got first rights to the prey and the females. Anyone straying from the path gets excluded or killed. The only way to beat the alpha is to defeat it and take its place.

Not to say friendship dosnt matter in human relations, but its definately not the top spot in the criminal underworld.

Your idea could still work though, nothing wrong with that, it would likely simulate a convincing result.
User avatar
paktsardines
level5
level5
Posts: 1752
Joined: Mon Oct 01, 2012 11:10 am
Location: Australia

Postby paktsardines » Fri May 31, 2013 1:02 am

I might try it out myself this weekend and see how a collection of circles [aka 'prisoners'] would behave on the screen...

.. after the new GFC version is done, of course.
Great Magical Hat
level3
level3
Posts: 486
Joined: Thu Dec 15, 2005 4:57 pm
Location: Netherlands

Postby Great Magical Hat » Fri May 31, 2013 1:04 am

AgentPaper wrote:I like the idea of gangs and more complex prisoner interaction, but modeling every single interaction between two prisoners whenever they meet is not really a feasible thing to be doing.


I wouldn't be so sure about that. I'm not saying that it is feasible, but that it's very hard to say whether it is just like that.

There's this saying in programming: premature optimization is the root of all evil.
User avatar
paktsardines
level5
level5
Posts: 1752
Joined: Mon Oct 01, 2012 11:10 am
Location: Australia

Postby paktsardines » Fri May 31, 2013 2:14 am

It can always be scaled anyway. No reason the modelling can't be done every nth meeting (or, even better, every random(m,n)th meeting).
Great Magical Hat
level3
level3
Posts: 486
Joined: Thu Dec 15, 2005 4:57 pm
Location: Netherlands

Postby Great Magical Hat » Fri May 31, 2013 2:26 am

paktsardines wrote:It can always be scaled anyway. No reason the modelling can't be done every nth meeting (or, even better, every random(m,n)th meeting).


I'm afraid that might be a bit of a problem. You see, I think what would be hard on your computer wouldn't be handling every single meeting, but in fact finding what prisoners are "meeting".
User avatar
paktsardines
level5
level5
Posts: 1752
Joined: Mon Oct 01, 2012 11:10 am
Location: Australia

Postby paktsardines » Fri May 31, 2013 2:54 am

I think it'd be more likely handled asynchronously on a per-prisoner 'object' basis. I suspect it's already being done and that's how prisoners know to go slowly when they bump into things. For example, currently I think prisoners operate something like the following:

Code: Select all

1. Determine what I want/need/should be doing next
2. Find a path to the objective
3. While I haven't reached the destination
    3.1 Walk along the path a bit
    3.2 Have I hit something?
        3.2.1 Walk more slowly
    3.3 Am I being searched/punched/whatever...
        3.3.n  do something
4. Do whatever I should be doing now I've reached the objective
5. Do 1 again.


If so, 3.2 could easily be expanded into something like

Code: Select all

3.2.1 Is it a prisoner I have bumped n times before?
    3.2.1.1 call trait mapping function
    3.2.1.2 update 'friendship level'
    3.2.1.3 insert soap joke
3.2.2 Walk more slowly
etc..
User avatar
Novbert
level2
level2
Posts: 82
Joined: Thu Aug 01, 2013 7:24 am

Postby Novbert » Thu Aug 15, 2013 1:41 pm

I kinda like the idea, here are my two cents:
"1. New prisoners have no friends. " - not necessarily true. Some prisoners arrive with a part of their sentences actually passed (probably in another prison) They might know each other and be friends/enemies.
I also think that low friendship levels (i.e. enemies) should have implications, even in everyday situations. Gangs should try to get separated in the canteen, in the shower, etc. and if they can't be separated, things should get a nasty turn pretty soon (imagine a gang member, who has to eat his lunch at another gang's table as he can't find any other place to sit down)
But if we'd model prisoners' behaviour in this depth, why wouldn't we include workers and guards? Can't they have relationships with prisoners and each other?
Pogo
level2
level2
Posts: 114
Joined: Tue Jul 23, 2013 2:54 am

Postby Pogo » Thu Aug 15, 2013 3:29 pm

Will read the rest of the post in a bit, but had to stop and post this first...


Why do new prisoners automatically have 0 friends?

If 8 prisoners are dropped off at the prison in the morning, isn't is likely that some of these prisoners already became friends while in county lock up? Or perhaps they were arrested together committing the same crime?

Moreover, how about prisoners that were part of the same street gang. One got arrested one day and has a life sentence, the other is arrested several days later and also has a life sentence. They knew each other extremely well on the outside, and despite being arrested and in prison for separate crimes, they are already friends?



Moreover, what about street gangs that bleed over into prison gangs? What if, for example, I'm a member of the East Coast Reds, and several former ECR members have already been arrested in the past, and they formed a branch of the gang in prison. And since we're such a hardcore gang, we somewhat regularly have hardened criminals being sent to this prison, constantly increasing our numbers, plus in-prison recruiting. And let's say I'm a high ranking lieutenant in this gang... wouldn't I already have some built-in friends?



I'm not saying every incoming prisoner should already have built-in friends or built-in gangs that they're already a part of. I just think that on occasion, perhaps an incoming prisoner should know some people on the inside before he gets in.

I would guess that realistically this may be most common among medium security prisoners. And then perhaps the occasional max security prisoner might be a high ranking leader of an outside gang that also has an inside presence. And minimum security prisoners would probably be mostly unconnected, just my guess.


Regardless, I think this should be accounted for, and incoming prisoners should on occasion already have friends or gangs inside.
User avatar
Ric666
level3
level3
Posts: 484
Joined: Wed Oct 10, 2012 10:12 am
Location: Edinburgh, Scotland

Postby Ric666 » Thu Aug 15, 2013 3:33 pm

Please no friends lists. This isn't facebook! :P

I like some of the above ideas though. Just not sure how it would all work within the game. Food for thought. :)
Pogo
level2
level2
Posts: 114
Joined: Tue Jul 23, 2013 2:54 am

Postby Pogo » Thu Aug 15, 2013 3:51 pm

I have relatively little first hand experience with bad prisoner behavior in Prison Architect, but it seems like if the gangs were modelled to work anything remotely close to the original post layout, then the algorithms for determining what kind of behavior the gang partakes in is largely already in place, right?


For example, riots are already most likely to happen in places like the shower, yard, and canteen where you have a larger group of prisoners in relatively close proximity. You've got one upset prisoner speaking his mind. The other prisoners start listening, start agreeing, and then there's a riot.


Well, the gang behavior outlined in the original post puts these groups of prisoners in close proximity as often as possible. Instead of being split among several different areas during free time, one gang may prefer the Yard, while another gang may prefer the Common Room. In fact, with a little extra behavior modeling, these gangs may even deem these areas to be theirs during free time and disallow other prisoners from using these areas during free time, particularly if there are no guards in the area. If the problem were bad enough, all non-gang prisoners may be stuck in their own private cells, etc.

Now then, when all the gang members are happy, they just go about their business. But if one of them is upset about something, then he's going to start speaking his mind. And all his fellow gang members he's hanging out with are going to hear about it.

Even if they're not all congregated together, Gang Member A1 is pissed about shower time. He works with Gang Member A2 and A3 in the laundry room, and he tells Gang Member A2 and A3 about being pissed about shower time, and that gets them mad about it too. Gang Member A1 then sees A4 in the hallway and tells him about it, and A2 tells A5 about it in some other hallway, and A3 tells A6 about it in another hallway. And A6 doesn't have his own cell--he's in a holding cell. So A6 tells A7, A8, A9, and A10 about it that night in the holding cell, and by the next shower time, this 10 man gang is instantly ready to Riot, and they may even start the riot in the hallways on the way to the shower.

The riot behavior will remain mostly unchanged. Prisoners will just prefer griping to fellow gang members first, and gang members won't fight each other.




And then there's game logic in place for guards to come help each other out, secure certain areas, etc. This same logic can be applied to gang members. If a prisoner is not in a gang, no one will come help him out if he's attacked. But he's also not at risk of being attacked simply for being a gang member. But if gang member A attacks gang member B, and other members of Gang B see/hear/know about it, then the other B gang members will come attack Gang Member A to protect their gang. And if other members of Gang A are in the area, they'll fight B gang member to protect their gang. Meanwhile, non-gang members and members of other gangs will try to avoid the fight, unless they were already mad and looking for a Riot anyway. They'll make a decision on whether to escalate the Riot in order to make an escape attempt or something or to stay out of it and avoid punishment, etc. And they should generally lean toward avoiding punishment unless they're already mad about something.
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Postby xander » Thu Aug 15, 2013 6:44 pm

You might have a look at Wasserman's Social Network Analysis.

xander

Return to “Community Members”

Who is online

Users browsing this forum: No registered users and 12 guests