Page 3 of 7 FirstFirst 1234567 LastLast
Results 21 to 30 of 62

Thread: An attempt at mapping using economics.

  1. #21
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,251
    Blog Entries
    8

    Default

    Done dev item 4 so now if rested it looks better with:

    Code:
    Character Andy would like to be building a shack.
    They need the following:
    100.000000 Arm load(s) of at least 100.000000% quality Timber
      which would be available right here.
      if they start by chopping down trees.

  2. #22
    Community Leader mearrin69's Avatar
    Join Date
    Sep 2009
    Location
    Portland, OR
    Posts
    2,318

    Default

    This is fascinating stuff, Redrobes. Wish I could help out by you're out of my depth. I've played around with artificial life programming a bit but Ai is beyond me.
    M

  3. #23
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,251
    Blog Entries
    8

    Default

    Dev Item 5 done now - at least for item quality improvement. So its making a much better assessment of the amount of work involved in getting a hunk of rough raw materials into engineering materials. A shack now costs about 20K and is worth 10K so this is a little more like it. Now, Andy would rather sleep rough than spend 20K on a shack to rest in at this stage and when all fit and rested he is opting to chop trees instead of building that shack for his primary source of wealth. That's also more in line with expectation. I could see Andy the scavenger with his axe and handful of grain thinking ok what to do ??? I know, lets start building a full on castle all by myself cos they're worth a fortune ! I am hoping that as he keeps chopping wood and since he owns the wood then he will eventually chop enough down that the cost of the shack will fall until its stable 10K value / falling costs becomes something that will be his primary focus. Also, the idea is that after some chopping the price of logs should drop so maybe he might decide that chopping trees for the sake of it is not worth it but then the value of the shack would become dominant and that he would then chop trees in order to make the shack even tho logs are cheap. This is where it all gets interesting and only then will we know whether this is an idea that we can use to map the town.

    After I get him moving and performing these transactions I think I need to adjust the prices of items to see if he changes his mind about stuff he has a choice in.
    Last edited by Redrobes; 09-07-2010 at 07:33 PM.

  4. #24
    Community Leader Facebook Connected tilt's Avatar
    Join Date
    May 2010
    Location
    Trelleborg, Sweden
    Posts
    5,787
    Blog Entries
    2

    Default

    sounds like a sound decision - he's a smart guy that Andy fella ... I'm so looking forward to hearing/seeing more
    regs tilt
    :: My DnD page Encounter Depot free stuff for your game :: My work page Catapult ::
    :: Finished Maps :: Competion maps - The Island of Dr. Rorshach ::
    :: FREE Tiles - Compasses :: Other Taking a commision - Copyright & Creative Commons ::
    Works under CC licence unless mentioned otherwise

  5. #25
    Community Leader Facebook Connected Steel General's Avatar
    Join Date
    Jun 2008
    Location
    Ft. Wayne, IN
    Posts
    9,531

    Default

    Just wait until Andy gets married!
    My Finished Maps | My Challenge Maps | Still poking around occasionally...

    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.



  6. #26
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,251
    Blog Entries
    8

    Default

    Lust is definitely on the agenda...

    Been doing a teeny bit of UI work today so I can output the map state with a little more info on it. Really I need ViewingDale cos there is too much to fit in so I would like to zoom in and see all the items dropped at a certain point but its a lot of faff and id like to be able to make movies of the actions per progression / turn. So enhanced the bitmap output to this. Now you can see a tree on all the green squares and dirt on the brown, rock on the grey and water on the blue. If he chopped a tree down then he should produce some logs on the map. The icons are done but ill wait until it actually happens and then you would see them all. I need to make a key for the items I have so far. But I know you all like some pics and this thread is rather lite on them so far. Next stage is get him moving to the water by finding lowest cost route. This is probably something I expect many people have programmed but ill take a simple approach for the first stab by making him go sideways or diagonal depending on the amount he is off and the path values to bias it and stuff doing an overall path search at this stage - but I know I will have to in the future or else he will get stuck in a corner of ground that cannot be traversed. Im more interested in getting the economic bit going right first tho.

    Oh yes, also doing some timing and its currently going at 200 turns per sec which is a bit slower than ideal but alright for the moment.
    Last edited by Redrobes; 09-08-2010 at 01:23 PM.

  7. #27
    Community Leader Facebook Connected tilt's Avatar
    Join Date
    May 2010
    Location
    Trelleborg, Sweden
    Posts
    5,787
    Blog Entries
    2

    Default

    yeah.. a picture (and thats worth a thousand words, so you saved a lot of work there) ... looks cool, a bit way to go yet for the settlers graphics *lol*
    regs tilt
    :: My DnD page Encounter Depot free stuff for your game :: My work page Catapult ::
    :: Finished Maps :: Competion maps - The Island of Dr. Rorshach ::
    :: FREE Tiles - Compasses :: Other Taking a commision - Copyright & Creative Commons ::
    Works under CC licence unless mentioned otherwise

  8. #28

    Default

    Hmm,
    This is incredibly awesome.
    It's really nothing like DF, and unless you want to show all the things happening in real time, I don't think the time it takes is that crucial. If you are using it to generate a fantasy city map, based on economy, for use--for instance--in a video game or rpg (obviously the user of the final map probably has to spend some art time making it appropriate looking for their game--but it's a base, of a realistic city, based on the need of it's original inhabitants and it's immediate environment), then it's totally different from DF.

    Personally I'd be very interested in seeing something like that. Especially something that iterated over time, so you can input, say, "100 colonists, wealthy, very religious" for your people, and for your starting environment, "Harbor, forest within 2 km, temperate climate", "1000 years later, no major wars or invasions".

    Then from humble roots, you'd have an actual, working city. Obviously you'd need some random factors (people dying, philosophies that can be interjected, such as "planned city" vs "organic growth") but it would make for a wild program.

  9. #29
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,251
    Blog Entries
    8

    Default

    I always like seeing people with 1 post and join date of a year and a half Welcome to the guild streever ! Yes thats exactly it. We have oodles of techniques around here for taking an existing layout and souping it up into something which looks fantastic but were always missing the layout and once you have the city we all have to populate it all up. So this is supposed to fix the two bits were missing. Crayons has some good POV ray rendering for buildings going on and I did a nifty script based thing to thatch a set of height mapped buildings with all the thatch or roofing tiles looking right for the building. So we need to know where the building are located such that its still possible to get in and out of them sensibly and they all ought to reuse existing walls to make terraced housing because walls are expensive so reusing them on both sides is much cheaper. Very difficult to tell a computer where to put them down without the context were building up as part of the AI growth progression.

    At mo I have a spawn human percentage and I have hacked it so that its either off or on because I am in debug and want one or not but the idea is that people will randomly and very occasionally spawn out of thin air but on the main be born from lustful meetings of people. People will also have a random chance of dying based on some simple actuarial graph but again I expect that on the whole they will have a substantial chance of dying due to battle and accidental losses.

    You wont put forest within 2km but input a really simple terrain map with no man made stuff on it. It will determine where the trees and harbor are. I think for the time being there will only be temperate but its being programmed with hard coded but modify able rules in it. I.e. it would be easy for me to add them. I don't know if I need rules to say if its cold enough then you can build an igloo etc but I see no reason why that could not be done.

    In terms of growth and planned. I think there will be a point at which we will see that there needs to be a village council, town council, city admin etc. At some stage there would be enough of a need to protect the city from invaders and permanent manned soldiers need to be on guard. Who is going to pay them ? It has to come from a city wide tax. So no tax no central protection and you rely on mob rule. So tax is something that I am keen to discover if I can model to a point where we can see its useful. Once you have a big enough tax and central government then they might have enough clout to buy out houses and trash them in order to put a new road in. I may ensure that their value bias for roads is very high for example. It may need a type of human with some different skills in it like city administrative stuff in order to trigger new transactions which no one else can do. But since its kinda programmable then I think thats all on the cards if a long way off at this stage.

    The one thing I think I will never be able to fix is future speculative thinking as outlined in the above posts. So I don't think that I can get an admin to put a whole new road down because, speculatively, he would believe it would help transport around the city and increase its GDP. But he could take any road of at least 50% quality and apply his transactions to that and boost all those roads and get them all cobbled and paved into highways at the expense of all houses currently blocking them. I can make him super paranoid so that he hires masses and masses of henchmen to protect him and therefore create the standing guard. Not sure at this stage how at this point that I can make anyone build a wall around a city to speculatively protect it in case of future invasion.

    1000 years is quite a long time. My turn is about 1/4 hr or so and it looks like its going to calculate one man on a 32x32 map (super small) at 200 x 1/4hrs per second. So 2 days per second per man. There's still a possibility that I could go 4x that speed with a quad core etc but for now its single threaded. We'll worry about performance when I have it all going to a certain acceptable state.

    I will do a icon key shortly but gotta shoot for a while...

  10. #30
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,251
    Blog Entries
    8

    Default

    Ok I got some good progress late last night with a sesh on it. The guts of the engine is going now. Its not all that elegant and I will look at refactoring large sections of it but it proves the point that its doable. I have Andy going around and using his skills and making stuff and its changing the perceived values of goods and adjusting the path behind him as he goes. I have it so that he bashes up rock into aggregate, shapes them into stones and improves the quality of them. Chops trees into logs, planes them into planks. Plants seed, tends crops and harvests them. Then he also drinks, eats, and sleeps. Eventually he builds a shack ! I have also been optimizing some of the worst areas of it so its running at about 1000 progressions per sec again though I have to add some more chronic slow code in for the best path algo. I have a neat idea to speed that up tho when it goes in and I am having some good thoughts about trading based on an Ebay type approach with a public auction for all items so that there is a bidding system in place which is much more like real life with the stock market. One assumption I had was that two characters would have to be at the same spot to trade but that prevents a market type auction so I think ill make two people meet to trade but the bids can come in across the map and if he is outbid then he does not trade. I.e. Andy and Bob are on the same square but Charlie says "if you have any X then ill give you Y for it" even if Charlie is not in the transaction the information about possible sales is known to all so that he would not have to be involved to still affect the outcome of Bills sale.

    Anyway. Heres the latest map and theres a movie ill try to attach. Its only a couple of meg and worth watching if your interested in this thread. Its XviD as usual so use VLC if your having trouble getting it to play.

    Oh yeah I changed the original simple map so there was less border so he stays in the middle more. Its attached as well.
    Attached Images Attached Images
    Attached Files Attached Files

Page 3 of 7 FirstFirst 1234567 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •