PDA

View Full Version : Hood Organisation



kerching
06-14-2013, 01:29 AM
What with expansions being limited, and new buildings coming out so frequently, it's more important than ever to make the most of your hood space.

Does anyone have a program which can help with this?

I know white frog's spreadsheet had something similar, but I don't think it was automated? A useful method might be:
1. Input the size of your hood
2. Input your buildings
3. Building sizes are stored in the program itself (eg gatling turret is 1x1)
4. The program then organises your buildings into a position which leaves large spaces free, and closes up small gaps.

Is this possible?

Thanks peeps :D

Fatherllama
06-14-2013, 02:17 AM
I haven't seen anything like this, and it would probably take quite a bit of programming. I will tell you that if you're running out of space, you should probably excise your worst few buildings, especially the larger ones.

AppleMacGuy
06-14-2013, 03:07 AM
Does anyone have a program which can help with this?

Everyone has a program for this - it's the grey matter located between your ears :p Seriously though, optimising your hood organisation is merely an exercise in patience and some trial and error.

Failing that, you could always go and look at some other player's hoods for some pointers.

kerching
06-14-2013, 03:21 AM
Everyone has a program for this - it's the grey matter located between your ears :p .

My grey matter is definitely not powerful enough for that :p

I'm just surprised that no-one's made one tbh. People here seem to have almost everything about the entire game covered!

BigMoney
06-14-2013, 03:56 AM
I don't think the problem is figuring a program to fit blocks of space to a grid of space, but to do so in an optimal fashion. I mean, I've got all of my 12-hour buildings in a row (which still inexplicably get out of sync, thanks GREE), and my 24-hour buildings are fairly clustered together, but everything else is a mess. I've done a good job of cramming everything together, but I'd like for buildings that pay out in common multiples to be as close together as possible. It seems like a problem with no general solution.

Edit: another problem I see is if you did have an almost entirely packed hood, a new LTB might requiring rearranging the entire hood, which might not be possible if you don't have enough free space to shift buildings around.

sister morphine
06-14-2013, 04:34 AM
Everyone has a program for this - it's the grey matter located between your ears :p Seriously though, optimising your hood organisation is merely an exercise in patience and some trial and error.

Failing that, you could always go and look at some other player's hoods for some pointers.
Agree totally. Use brain, imagination and preferably some artistic sensibility

http://i1278.photobucket.com/albums/y503/SisterMorphine63/null_zps0cd4d974.png

http://i1278.photobucket.com/albums/y503/SisterMorphine63/null_zps89fe66eb.png

Lars
06-14-2013, 05:25 AM
I think this is a kind of problem that is called "NP-hard" in computer science (its a "rectangle packing problem", a 2d version of the well known "bin packing problem"). As a result an optimal solution for big hoods it should not to be possible in acceptable running time (like: within your lifetime ...).

You can use an approximation algorithms to get a near-optimal solution. However, those that I know won't give you better results than placing them by hand with relatively simple strategies.

OffensivelyNamedGuy
06-14-2013, 05:45 AM
What I used to do is represent my total hood space as a grid in excel, and move coloured groups of cells around representing my buildings. Same as doing it in CC, but much quicker and less likely to accidentally sell something.

Can't be asked to do it anymore though. If I need space, sell ****ty buildings.

c00guy
06-14-2013, 06:04 AM
I think this is a kind of problem that is called "NP-hard" in computer science (its a "rectangle packing problem", a 2d version of the well known "bin packing problem").

You can use an approximation algorithms to get a near-optimal solution.
Umm okay, on it! Lmao!!

kerching
06-14-2013, 06:20 AM
I think this is a kind of problem that is called "NP-hard" in computer science (its a "rectangle packing problem", a 2d version of the well known "bin packing problem"). As a result an optimal solution for big hoods it should not to be possible in acceptable running time (like: within your lifetime ...).

You can use an approximation algorithms to get a near-optimal solution. However, those that I know won't give you better results than placing them by hand with relatively simple strategies.

Something like this?

http://www.codeproject.com/Articles/210979/Fast-optimizing-rectangle-packing-algorithm-for-bu

Or even this?

http://pollinimini.net/blog/rectangle-packing-2d-packing/

Lars
06-14-2013, 07:04 AM
Something like this?

http://www.codeproject.com/Articles/210979/Fast-optimizing-rectangle-packing-algorithm-for-bu

Or even this?

http://pollinimini.net/blog/rectangle-packing-2d-packing/

No, these are for packing rectangles into a single rectangle (as small as possible, but unbounded), not into a collection of rectangles (with fixed size).

More like this: http://users.cs.fiu.edu/~yzhan004/rectangularPacking/survey.pdf

Or this: http://www.sciencedirect.com/science/article/pii/S0166218X0100347X

nopenopenope
06-14-2013, 08:39 AM
There are hood planners in various spreadsheets. Look around.

zwiswoo
06-14-2013, 08:40 AM
Rectangle packing being NP hard doesn't imply anything about the problem for optimizing hoods in CC. No such classification means anything applied to a fixed size problem - they are about how the problem's difficulty grows with number of pieces. Here we have at most 80x80 space.

And the cc problem has many built in optimizations - every solution is equivalent over relative placement of say 6x6 buildings for example. And you can swap the hood blocks for each other. And each block has left-right or up-down symmetry, etc. I'm guessing a hood building planner would be quite possible. It just doesn't seem that useful compared to the work it would take, since doing this stuff in your head isn't very hard. Or just look at hoods that use space well.

Lars
06-14-2013, 09:32 AM
Rectangle packing being NP hard doesn't imply anything about the problem for optimizing hoods in CC. No such classification means anything applied to a fixed size problem - they are about how the problem's difficulty grows with number of pieces. Here we have at most 80x80 space.
I think run time will be n! for n the number buildings to be placed(*) (412 buildings for my hood -- not feasible). Having 'only' 6,400 grid points doesn't help; it's about the number of possible configurations which are not reduced by the grid layout. The grid just makes the configurations more regular but not smaller in number.

(*) If you have an approach with a significantly better run time I would be glad to hear it.



And the cc problem has many built in optimizations - every solution is equivalent over relative placement of say 6x6 buildings for example. And you can swap the hood blocks for each other. And each block has left-right or up-down symmetry, etc. I'm guessing a hood building planner would be quite possible.

Yes, a specialized approach could take advantage of limited number of block sizes and it *might* help. However, I think it is by no means obvious it will. (It makes many configurations equivalent. I fear managing equivalences won't be faster here than to try out all combinations.) Also, industrial applications of 2d bin packing often have the same problem restriction and research community still work on small improvements for the approximate solutions for those cases ...

Blocks being horizontally and vertically symmetric won't help at all -- that's pretty much the default 2d bin packing (ie on axis parallel rectangles). Note that even 1d bin packing is already NP hard which is like the default 2d bin packing with boxes and blocks all having the same height, only different widths. And that is an even stronger restriction than just the symmetries in our case.



It just doesn't seem that useful compared to the work it would take, since doing this stuff in your head isn't very hard. Or just look at hoods that use space well.

Agreed! :D

zwiswoo
06-14-2013, 09:54 AM
Lars, I agree a simple brute force over arrangements of 400 buildings is too slow. But that's not a fact about NP hardness or any other complexity class, which I think you'll agree are about asymptotics.

But the fact that buildings all come in one of 6-7 shapes seems like a fairly big reduction to this 400. Heck if you really have 400 (!) buildings I'm pretty sure you have 50 of at least 4-5 different buildings, and it makes no difference how you organize internally among them. More typically you'll see about 50-60 buildings in a small-ish hood, not 400 in a huge one, and with all the class reductions (2x2 4x4 6x6 6x5 etc) it seems like it could be quite tractable.

Anyway, tractable doesn't mean easy. I certainly wouldn't want to spend time writing such things :D

gunny22
06-14-2013, 11:48 AM
1. Input the size of your hood
2. Input your buildings
3. Building sizes are stored in the program itself (eg gatling turret is 1x1)
4. The program then organises your buildings into a position which leaves large spaces free, and closes up small gaps.

5. Hide big iph buildings behind other buildings.

gunny22
06-14-2013, 11:59 AM
Use brain, imagination and preferably some artistic sensibility

'preferably" being the keyword.
There are indeed some beautiful hoods out there, like the screenshots posted, but it really doesn't matter for gameplay. I remember when I started the game I even left room between every building (to be able to "reach" the front door). LOL
When I realised that was not necessary, and the cost of land in cc went up exponentially, everything was quickly moved.
Thank god you can move a building without cost (and without resetting the upgrading and payout time).
Since then I have been cramming every free building in the available space with a result that my almost 100 building-hood has been called "ugly" several times on my wall, but like I said before, who cares.

Lars
06-14-2013, 12:16 PM
Yes, for example I got many 2x2 defense building. However, I thought we were talking about about a program that can be used to solve it for any possible hoods, not just mine as it is right now ... And 50-60 buildings could be already too hard. Left as exercise to the reader to check it.

And about all those building in my hood. I think miscalculated the number, there are "only" 312. Feel free to count :p :
http://i1057.photobucket.com/albums/t381/knipping/hood_zps2ccf9b4a.png (http://s1057.photobucket.com/user/knipping/media/hood_zps2ccf9b4a.png.html)

Note the small free space left next to the toy box for building a second one. :)

The Fonz
06-14-2013, 01:07 PM
Everyone has a program for this - it's the grey matter located between your ears :p Seriously though, optimising your hood organisation is merely an exercise in patience and some trial and error.

Failing that, you could always go and look at some other player's hoods for some pointers.


Agree totally. Use brain, imagination and preferably some artistic sensibility


Is there a thread that features screen caps of players' neighbourhoods? I'm looking for ideas to enhance the curb appeal / overall aesthetic of my own neighbourhood, without taking too large of a hit on the wallet.

zwiswoo
06-14-2013, 01:19 PM
I'm actually quite interested in how you got that beautiful screenshot of the whole hood. Stitch lots of little ones or is there a trick.

Lars
06-14-2013, 01:28 PM
No trick: small screenshots, cut out the game info parts and used the magic wand in my image editor to remove the background (a bit tricky for the surveillance centers). Manually stiched things together then. Finally, added a gradient background (same colors as in the game).

It took me some time but I wanted to create this these days anyway.

PS: feature request to Gree -- please add a "save snaphot of full hood" button :)

the_dude
06-14-2013, 07:14 PM
PS: feature request to Gree -- please add a "save snaphot of full hood" button :)

Or they could give you the ability to zoom all the way out. Would make it easier to scope out a hood to rob too.

Lurker
06-14-2013, 08:07 PM
Well done sister

Lurker
06-14-2013, 08:15 PM
That picture is a thing of beauty.


Yes, for example I got many 2x2 defense building. However, I thought we were talking about about a program that can be used to solve it for any possible hoods, not just mine as it is right now ... And 50-60 buildings could be already too hard. Left as exercise to the reader to check it.

And about all those building in my hood. I think miscalculated the number, there are "only" 312. Feel free to count :p :
http://i1057.photobucket.com/albums/t381/knipping/hood.png (http://s1057.photobucket.com/user/knipping/media/hood.png.html)

Note the small free space left next to the toy box for building a second one. :)

Lurker
06-14-2013, 08:17 PM
Where is your nite club? Trying to find it here but not sure if you don't have one or if it is just too well hidden.

PawnXIIX
06-14-2013, 08:27 PM
Where is your nite club? Trying to find it here but not sure if you don't have one or if it is just too well hidden.

Behind the hotels it looks like - usually a popular hiding spot :p

sister morphine
06-14-2013, 11:16 PM
'preferably" being the keyword.
There are indeed some beautiful hoods out there, like the screenshots posted, but it really doesn't matter for gameplay. I remember when I started the game I even left room between every building (to be able to "reach" the front door). LOL
When I realised that was not necessary, and the cost of land in cc went up exponentially, everything was quickly moved.
Thank god you can move a building without cost (and without resetting the upgrading and payout time).
Since then I have been cramming every free building in the available space with a result that my almost 100 building-hood has been called "ugly" several times on my wall, but like I said before, who cares.
Lol, I do. Hate ugly hoods but everybody has their own priorities :cool:

http://i1278.photobucket.com/albums/y503/SisterMorphine63/null_zps227c9c98.png

Flaunt those fancy earners!

madfighters
06-15-2013, 05:09 AM
That expansions are limited

jmeijer
06-15-2013, 05:21 AM
I like to have a nice hood; I deleted my worst buildings to make space. It's not a hood like Gledrius or Public Enemy, but it is something.

http://img42.imageshack.us/img42/3219/fmq.png (http://imageshack.us/photo/my-images/42/fmq.png/)

http://img600.imageshack.us/img600/8899/n140.png (http://imageshack.us/photo/my-images/600/n140.png/)

savage9r
06-15-2013, 05:37 AM
My first job was bagging groceries at the market so I'm used to making the most out of spaces lol

gunny22
06-29-2013, 05:08 PM
That expansions are limited
I think the limit is 30. I'm sure you can find it in a faq.

Rodimus
06-30-2013, 01:19 PM
A gentleman's club in front of a church, lol