Grrrrr. AI

This fine, Sunday afternoon I'm messing around with making animation run smoother.  In the process, I discovered something -- the AI's moves can get aborted in some instances due to framerate. Just fixed this. Should make a big difference in AI quality, especially late game.

53,705 views 38 replies
Reply #1 Top

Any chance you could look at ranged AI since you are in the neighborhood?  :D

Reply #2 Top

ranged AI?  I'm not talking about tactical battles.

Reply #3 Top

Oh, I was only thinking about tactical. Oh well. I just moved bow spells back to infinite range. 

 

Nice to see some AI love, regardless of the type.  :thumbsup:

Reply #4 Top

What??? What kind of slapped together architecture does this game have?

This is almost as funny as the last post about "multithreading." LOL!

Reply #5 Top
Good to hear Frogboy! I enjoy all your little posts about fixing bugs here and there - interesting to see how the game keeps improving, one incremental step at a time.
Reply #6 Top

So the graphics animation canceled AI threads? Wow. Well, the AI keeps getting better.

Love to see improvements to animation. It's not bad, but it does get jerky/choppy on a regular basis, especially late game or with lots of units on screen. Hopefully the 1-tile city system should help.

Reply #7 Top

AI upgrades are always good.

 

I was playing galciv 2 yesterday and gosh the AI is good. Hope you can get it as good.

Reply #8 Top

Quoting NoobFukaire, reply 4
What??? What kind of slapped together architecture does this game have?
End of NoobFukaire's quote

I believe it has "beta" architecture. ;)

Reply #9 Top

There will always be bugs, no matter how good the architecture.  In this case, it was a matter of synchronizing animation with the turn ending when in different threads.

Reply #10 Top

Quoting Frogboy, reply 9
There will always be bugs, no matter how good the architecture.  In this case, it was a matter of synchronizing animation with the turn ending when in different threads.
End of Frogboy's quote

That explains it. Good to know the root cause. And bugs and beta go hand-in-hand. And I also think the SD community is particularly good at finding edge cases! :ninja:

Reply #11 Top

Pretty sure he was just trolling. No need to respond.

Reply #12 Top

Is this the bug I reported about some AI troops moving to some random tile in the game and then just staying there for the rest of the game and never moving from that spot?

Reply #13 Top

That would be Pathing. 

Reply #14 Top

Quoting Trojasmic, reply 12
Is this the bug I reported about some AI troops moving to some random tile in the game and then just staying there for the rest of the game and never moving from that spot?
End of Trojasmic's quote

No. This would be a mid game thing where the units are only moving every other turn.  

Reply #15 Top

Seems to me like sometimes when an army no longer has its current mission, it will just stop and sit for the rest of the game. For example an army in my territory when I make peace. It will just stop there forever. I think that is what Trojasmic is experiencing.

Reply #16 Top


Those veterans are just waiting for you to give them their hard-earned land grants... ;)

Reply #17 Top

I had one friendly army that was dead stopped until I cleared out an Earth Elemental Lair. After that he turned away from my territory and went about his business. To me, that would be pathing. I had kicked him out of territory a few times before this. 

 

Actually, I find it rather bothersome that the AI is constantly sending units through my territory. Would like it better if after a unit is kicked, it looks for something else to do, instead of forcing me to do the same thing for 20 turns until my pioneer can get there first and make an outpost. The AI should only think it is possible to move one turn through my territory. Never gonna let them go all the way through. Maybe they should only see anything past that as Water?

Reply #18 Top

Quoting seanw3, reply 17

Actually, I find it rather bothersome that the AI is constantly sending units through my territory. Would like it better if after a unit is kicked, it looks for something else to do, instead of forcing me to do the same thing for 20 turns until my pioneer can get there first and make an outpost. The AI should only think it is possible to move one turn through my territory. Never gonna let them go all the way through. Maybe they should only see anything past that as Water?
End of seanw3's quote

I think this should be Dependant on how much the AI player likes you, if he likes you lot he would be careful around your territory, and make arrangements if he needs passage, If he is more neutral he might as well walk for 3 turns through your territory than walk that huge path around the map, If he hates you he should rather disregard your territory (OFC only if he can live through a war, or have a decent chance by computer standards).

Sincerely
~ Kongdej

Reply #19 Top

I'm thinking of making the "kick out" penalty greater -- kicked out units get sent all the way back to their capital. That way, sneaking across someone's territory and getting caught is akin to being deported.

Reply #20 Top

Quoting Frogboy, reply 19
I'm thinking of making the "kick out" penalty greater -- kicked out units get sent all the way back to their capital. That way, sneaking across someone's territory and getting caught is akin to being deported.
End of Frogboy's quote

 

Please do!

Reply #21 Top

Quoting Frogboy, reply 19
I'm thinking of making the "kick out" penalty greater -- kicked out units get sent all the way back to their capital. That way, sneaking across someone's territory and getting caught is akin to being deported.
End of Frogboy's quote

Please make the penalty greater, or different, but please reconsider the word "capital"...

Seems kind of an odd feature to boot back to the capital, since that will change over big maps or small maps, it will change whether im behind another player into a third players territory (prolly make me go to war instead) and its all dependant on where my capital is, I would rather see a "closest City", or "outside the borders, but stunned 1-2 turns".

It could also be that if they reenter your territory in the next 4 turns they will automatically declare war.
Also there should be some special action from the AI if I keep entering theyre territory...

As a side topic to how angry they get when i enter territories etc. I hope the AI's Diplomacy will be greatly advanced.

Sincerely
~ Kongdej

Reply #22 Top

Quoting Frogboy, reply 19
I'm thinking of making the "kick out" penalty greater -- kicked out units get sent all the way back to their capital. That way, sneaking across someone's territory and getting caught is akin to being deported.
End of Frogboy's quote

Please don't. I think that's a really bad idea. Personally, I would exploit that as a free teleport back to my capital whenever it was about to be attacked. It could also be used as a free teleport all the way back across the map by units exploring far from home. Just too many ways to cheese it, IMO.

Why not introduce a stiff fine for repeat (within x turns) offenders instead? From the offending empire's coffers into the offended's. Helps the offended, hurts the offender. A double disincentive that way and no cheese exploits.

Reply #23 Top

Quoting Frogboy, reply 19
I'm thinking of making the "kick out" penalty greater -- kicked out units get sent all the way back to their capital. That way, sneaking across someone's territory and getting caught is akin to being deported.
End of Frogboy's quote

I agree! :)

Reply #24 Top

Quoting C0LDsteel, reply 22

Please don't. I think that's a really bad idea. Personally, I would exploit that as a free teleport back to my capital whenever it was about to be attacked. It could also be used as a free teleport all the way back across the map by units exploring far from home. Just too many ways to cheese it, IMO.

Why not introduce a stiff fine for repeat (within x turns) offenders instead? From the offending empire's coffers into the offended's. Helps the offended, hurts the offender. A double disincentive that way and no cheese exploits.
End of C0LDsteel's quote

 

but you can't manipulate the actions of the AI ....

 

maybe code it to be nearest owned city instead?

 

(but I really don't see it as an exploit, and it would prevent getting teleported onto some random peninsula/island which makes your units get stuck)

Reply #25 Top

I also would prefer bounced back to nearest own city(of the offender) and stunned for 4 turns as the penalty instead of sent back to capital to capital.

harpo