Jump to content

blargin3

Community Newbie
  • Posts

    4
  • Joined

  • Last visited

Everything posted by blargin3

  1. I see your point, I just wanted to clarify that I didn't mean slap the buildings any random place. But an analysis of a terrain may find multiple suitable positions for buildings, which is where the random part should play in.
  2. Excellent input, I like that my post has generated some thoughts. Let me clarify on some of the things I'm implying though. I'd personally like to see the AI mimic a human player as much as possible. I think that (with an ideal AI) if you recorded a game and watched the AI go, it would pass the 'Turing Test.' Hence my virtual mouse idea. The human player is limited in what they can do per command with the current UI (which I'm not complaining about) whereas the AI can issue commands for the women to hunt, 2 men to chop wood, 2 men to mine, and the cavalry to start scouting all in one frame! This ability is what I believe will make AIs hard to beat, and implementing the virtual mouse idea might bring it down to our level even with a great interface. But that's for an ideal world. As for the placement of the buildings, I wouldn't want them just randomly placed, I'd want their placement to be based on a random number. In impractical demonstrative pseudocode: double rand = randomMinMax(0,6);//make trained champions gather at a randomly-based point (somewhere East between 0-60 units of the CC) until ready for attackPoint championGatherPoint = Point(rand*10, CivilCenter.y); //build the first house 30 units North of the CC, and 0-30 units to the WestfindClosestCitizen().buildHouse(CivilCenter.x - (rand*5), CivilCenter.y - 30);//skip a lotif(population.needsHouses){ findClosestCitizen().buildHouse(lastHouse.x, lastHouse.y - (house.width/2) - (rand*5) ); //build houses along a straight line Northwards with spacing of 0-30 units between houses (assuming the houses local origin is in the center)}This random-based spacing will change the rate at which units traverse through the city. If the spacing between the houses is zero, it'll take just that little bit longer for the unit to go around the houses, if the spacing is 30, then units can traverse faster, but any wall building may require more stone and build time to fit them in. Add a bunch more little values like this based off the same random number iterated over thousands of frames, and you have yourself an AI that you'll never know what to expect from, and a unique game almost every time. And I feel that the virtual mouse idea will add predictability to the difficulty while maintaining this random-based strategy. EDIT: or you could skip the mouse thing and just have a command timer that's high in easy, low in medium, and non-existent in hard.
  3. I highly doubt this is probable at the current development state, but I've always wanted to see a RTS AI that had the same interface for every difficulty, and each difficulty had different implementation. In pseudocode, the AI would look like this for every game difficulty: assesResources(); planDefences(); if(animalsAround) huntForFood(); else buildFarms(); (...) And the implementation would be as follows for each difficulty: EASY: void huntForFood(){ moveMouse(womanClosestToAnimal,(pixelsPerSecond)30); //This mouse would be virtual and invisible to the player, of course mouse.click(); moveMouse(animalClosestToWoman,(pixelsPerSecond)30); mouse.rightClick(); (...) } MEDIUM: void huntForFood(){ moveMouse(womanClosestToAnimal,(pixelsPerSecond)60); mouse.click(); moveMouse(animalClosestToWoman,(pixelsPerSecond)60); mouse.rightClick(); (...) } HARD: void huntForFood(){ for each Woman in WomenCloseToAnimal womanClosestToAnimal.issueOrder(animal); } If this is combined with a genetic AI algorithm (especially one that's reactive to time elapsed and plans their city based on a random number), a human player wouldn't notice that it's the same algorithm with each difficulty. It would appear simply better. Is such an AI already in existence?
  4. Perhaps this "unfertility" could be dubbed a "development aura" represented in the terrain. Low concentration of buildings in an area would have terrain that looks grassy and untouched, high concentration of buildings could have a stone brick terrain that looks like a road. Perhaps it could have a bonus as well, like highly developed areas could increase unit movement speed. This would encourage a specific spacing of buildings. Just close enough to get that movement bonus, just far enough to have enough room for units. Maybe guard towers could "develop" moreso than usual buildings, so one could build them in a path between markets, effectively creating a trade route! But of course what should happen to this aura when the building is destroyed? Should it stay like that, die with the building, or rot away?
×
×
  • Create New...