November 4th, 2009, 21:59
(This post was last modified: November 20th, 2009, 09:03 by kyrub.)
Posts: 901
Threads: 28
Joined: Oct 2008
(within a context of previous sad_psilons discussion)
RefSteel Wrote:kyrub Wrote:Free colony ships are given when both
a) there is less than three of them (if I remember correctly)
b) the d500 roll is not bigger than the reserves BC Well, a) is presumably "there are three or less of them" since four colships seems to be standard (at least in these recent games, where I was paying attention and could see OPEs' entire fleets).
description:
During the next_turn phase, every AI runs a set of subroutines. Two are of major importance for us: first of them counts existing colships and gives the AI player a free colony ship (see quotes above), unless he owns 4 of them already. The second subroutine, following immediately, sends the appropriate colships, if there is at least 1 of them, to colonizable planets.
bug
Horribly though, if the AI owns 4 colships already, the first subroutine gives away a 0 result... so that it fails to launch them !
some consequences:
- the AI gets stuck whenever it gets the fourth colship, even if a free superb planet is just nearby
- it avoids the malicious effect if it can expand fluently, but it will be eventually caught when its [reserves] planets_BC * 2/5 attain the 500 BC mark --> a free colship / turn
- the points of sudden expansion come back when a new drive/landing tech is available --> the old 4 colships are scrapped, the new ones are launched
- the OPEs are stuck without the tech rescue, especially if the ship maintenance gets too high and ECO spending becomes unbearable
special mention goes to
- the AI contacted with Human player, which makes the AI expansion extra careful and slower --> increased probability of the bug
- [the bigger the difficulty, the more quickly the AI reserves are filled --> the more quickly the AI gets the 4th colship] - not true, see the edit
-------------------------------------------------------------------------------------
! EDIT !:
I have made an error in the free_colony_ship explanation - it is an old analysis and I did not verify it. Sorry.
The colony ships are not given based on AI reserves, BUT based on the planets BC (x7410 in the savefile).
The condition reads:
planets_BC * 2/5 > d500.
November 6th, 2009, 02:35
Posts: 55
Threads: 7
Joined: Jul 2006
Sounds like perhaps the simplest fix would be to switch the order of the colship giveaway and the launch. The AI would still be able to launch when they have 4 colships already, and it would only delay by 1 turn the launch of the first free colship.
The other, potentially trickier fix, would be to change the trigger for the launch_colship subroutine to something like num_colships >=1 instead of num_colships_given =1.
--This still wouldn't solve the problem of potentially crushing ship maintenance for a 1PE that DOESN'T have a planet in range to colonize.
A quick fix for that could be to change the free_colship cap from 4 to 2. Especially at higher difficulties, the AI can handle the maintenance on 2 ships and still research themselves out of the hole (and with the launch subroutine fixed, a new range tech can now also get their colships moving again).
November 6th, 2009, 18:33
(This post was last modified: November 20th, 2009, 09:04 by kyrub.)
Posts: 901
Threads: 28
Joined: Oct 2008
The fix is very easy (sometimes I am lead to believe that it works that way: horrible error = easy fix; small issue = hours of work).
I have posted it for testing purposes (see below). It would be nice to test it against the RefSteel's game or to see the effect on a new game, if anyone wants to. The bug is not at all only about the OPEs, it breaks the whole AI expansion.
The fact that AIs get free colony ships, is an incredibly strong cheat. From the threshold of 500 BC in [reserves] planets_BC * 2/5, they should be unstoppable. I always wondered how the human player can grab more planets than them. THIS is probably it. So, this thing alone will, in my opinion, make the game almost unplayable on impossible difficulty. (--> if true, we should let them "pay" for the colony ships.)
Olorin Wrote:--This still wouldn't solve the problem of potentially crushing ship maintenance for a 1PE that DOESN'T have a planet in range to colonize....
A quick fix for that could be to change the free_colship cap from 4 to 2. Yes, a quick and an easy one. But, having in mind the games in huge universes, the AIs could really use all 4 colships in later stages. Moreover, the colships are distributed randomly, so two may easily end up in the same corner of galaxy, far from the real stage.
I would suggest: to put a check in the free_colship subroutine, whether the subfleet (= the local gathering fleet focus point) where the new ship is about to be included contains 2 colships already. If so, don't give the ship. This would easily exclude 1PEs and early expansion in general and, as a plus, forbid an aggregation of colships in one part of universe later.
fix: move to moo directory, unpack, rename to starmap.exe
November 7th, 2009, 14:12
(This post was last modified: November 7th, 2009, 15:04 by LordLydon.)
Posts: 6
Threads: 0
Joined: Jul 2009
I gave your fix a test and it seems to work perfectly! (and just incase anyone else has the same problem... leave the ".exe" out when renaming it!)
I started an Average, Medium game with 3 opponents WITHOUT your patch, all 3 opponents settled 2-3 worlds and then stopped expanding and slowly accumulated the 4 Colony Ships as expected.
1 race in particular HAD a habitable world that was EASILY within drive range but just sat there with it's 2PE and 4 Colony Ships for more then 50 turns! I then reloaded from an old point and swapped your fixed STARMAP in. Right away that empire moved to colonize it... and then moved on to two other worlds (that it had NEVER scouted) and colonized them too!
Another empire did the same thing about 3 turns after the file change. The third empire was RIGHT beside the second empire and boxed in... now can you do anything about starting AI positions! =)
Great work Kyrub, that was only one test mind you but I was really happy with the result! Also, the Colony Ships ALWAYS appeared at the opponents Home World so I guess production plays a role in placement.
Edit: After another quick test, Colony Ship placement IS random! And I'm pretty convinced AI expansion has improved, but I still ran into a Mrrshan 3PE that quickly accumulated 4 Colony Ships when the next habitable world was only about 4 range away! (didn't have the tech) ...it's actually good some things will never change! =)
November 8th, 2009, 17:40
Posts: 901
Threads: 28
Joined: Oct 2008
Thanks, Lydon! Favourable results, although I remain rather cautious.
If the fix really works, it will be quite a revolution for the AIs. Especially the games in large / huge universes, where an AI can grab a whole area now, should be much more challenging.
As for the Mrrshans 3PE, it has got "expansion routine?" and perhaps "the stifling ship maintenance?" written all over hit.
November 11th, 2009, 20:58
(This post was last modified: November 12th, 2009, 18:21 by kyrub.)
Posts: 901
Threads: 28
Joined: Oct 2008
(post deleted)
Sorry. I was totally wrong with this one. The "bug" is a sort of total war in the last third of the game.
And the information was prone to exploits, so I had to delete it.
November 12th, 2009, 20:53
Posts: 5
Threads: 0
Joined: Nov 2009
Wow, I am very impressed with what you are doing.
Perhaps I am missing something, but did you get the MOO original code? Is it posted somewhere?
November 13th, 2009, 05:08
Posts: 901
Threads: 28
Joined: Oct 2008
Welcome to the RBO forums.
Thanks for the compliment, but the patch is still unfinished, after all these months (hopefully not for long).
And there's no source code released, I work like this.
November 18th, 2009, 21:27
Posts: 5
Threads: 0
Joined: Nov 2009
Thanks for the answer. I expect this has been asked as well (FAQ thread time? ) but do you think at some point a multiplayer MOO may be created via the route you are taking?
Another question Is there anything else I (or others) can do to help you? Provide specific savegames, report issues (what kind, where), etc.?
November 19th, 2009, 04:50
Posts: 901
Threads: 28
Joined: Oct 2008
piotrus Wrote:do you think at some point a multiplayer MOO may be created via the route you are taking? I cannot say it is impossible.
Let us distinguish more types of multiplayer:
4) 'classic' multiplayer game with 2 or more humans + X computer players
3) 'restraint' multiplayer with not more than 2 humans + 1-4 computer players (conserving the original number of players)
2) 'duel' multiplayer with 2 humans and no computer players
1) 'auto-combat duel' multiplayer with 2 humans and no computer players, but AI performed combat only
The numbers indicate the sheer possibility to perform the task. Right now, I am more pessimistic than three months ago, for two reasons. First, bigger changes are much harder to implement and I'm starting to see memory leaks a lot more. Second, I'm becoming fed up with giving my lifetime up for a game, albeit a wonderful game like Moo. At the beginning I thought it would take weeks to correct the bugs; but seeing how numerous they are, the second stage of the patch is still not posted. It's frustrating that I don't believe in reincarnation, I could finish it in the next life.
Short answer to the above: my wild guess is 2) may be done. But it is unlikely to happen.
Quote:Is there anything else I (or others) can do to help you? Provide specific savegames, report issues (what kind, where), etc.?
Thanks. I could use a small army of people willing to test specific features for...
- functionality
- game balance changes
- memory leaks (play through one game, to see if it does not break after hundreds of turns!)
The Larval patch will have a lot of complicated issues corrected and I'd really need some feedback before I put all together. Or I won't be able to find the problem later.
... if you're still interested, let me know.
|