AI Development Discussion

classic Classic list List threaded Threaded
1250 messages Options
1 ... 32333435363738 ... 63
Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

panguitch
Hmm, I was letting an all-Hard AI FFA (politics on) run its course and had a crash:

Error log: crash.txt
Save game: Crash.tsvg

Perhaps it's related to the fact that in the previous round Suel killed Nyrond's last hero. Then it crashes during Nyrond's noncombatmove.

But Nyrond is not the first to be vanquished, and I can't see what the problem is.

Does "NullPointerException" mean it's trying to select something that's no longer there? I don't know what that would be. The triggers that change someone to vanquished don't remove any units, just change relationships, current resource amounts, and retainCapitalNumber.

Moreover, these changes happened to Nyrond before Nyrond's turn, so why the error now?

Greyhawk Wars
TripleA in the original Dungeons & Dragons world

Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

redrum
Administrator
@panguitch - Looks like there is a bug around AA units in contested territories. I just made the fix and tested and it no longer crashes. It'll be in the next pre-release.
Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

Veqryn
Administrator
This post was updated on .
In reply to this post by redrum
So, fixing #1 would prevent the "bug", but it would still leave other bugs in the form of incorrect or bad validation.

As far as #2 goes, it looks like you spotted another bug: if you move the infantry from caucasus to archangel, it conquers both, which should be impossible.


The rules are supposed to be like this:
For units stuck in a territory that is enemy owned and empty:
0. All units may stay in the territory to conquer it.
1. All units may move out of this territory and into a friendly territory, without conquering it.
2. Units with blitz may move out of this territory and into further enemy territory(s), while conquering it.

So the infantry should be able to move out of Caucasus, and into Archangel, without conquering Caucasus, but with conquering Archangel (cus it is empty).

The tank should be able to move from Caucasus to Novosibirsk, while conquering all 3 territories.

I am undecided still on if you move the tank from Caucasus to a friendly territory, whether it should conquer Caucasus or not.  I am kind of leaning towards "no", since it feels like a retreat.
And then still more undecided on if you move the tank from Caucasus to Archangel, whether it should conquer Caucasus or not.  It is kind of a retreat then an attack, but could be considered 2 attacks as well.

Thoughts?


edit:
for units that begin a turn stuck in an enemy controlled territory that has enemy units:
0. All units may stay in the territory to try to conquer it.
1. All units may move out of this territory and into a friendly territory, without trying to conquering it.

Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

panguitch
@redrum

Awesome! Let's see what I can break next

@Veqryn

For what my opinion's worth, I think that makes sense.

I think of blitzing as "attacking-through" rather than just "attacking." Going from Caucasus to allied is neither attacking-through nor attacking. More like retreating. From Caucasus to Archangel isn't attacking-through, more like regrouping then attacking in a different direction. In neither case does it feel like Caucasus should be captured. It was a starting point, not an object of attack.

Veqryn wrote
For units stuck in a territory that is enemy owned and empty:
0. All units may stay in the territory to conquer it.
1. All units may move out of this territory and into a friendly territory, without conquering it.
2. Units with blitz may move out of this territory and into further enemy territory(s), while conquering it.
I'd add this permutation:

For units stuck in a territory that is enemy owned and enemy units are present:
0. All units may stay in the territory and try to conquer it.
1. All units may move out of this territory and into a friendly territory, without trying to conquer it. (Like a retreat.)
2. Units with blitz may not move out of this territory and into further enemy territory(s), because they must first fight the current battle before progressing deeper into enemy territory.

Greyhawk Wars
TripleA in the original Dungeons & Dragons world

Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

redrum
Administrator
@Veqryn - Interesting. Do we have any precedents? What maps actually have contested territories? Did you essentially create the rules around contested territories and blitzing?

In my opinion, the rules seem overly complicated. They currently lead to weird situations like the tank to Caucasus then Archangel. I think blitzing needs to be defined as either being able to attack multiple empty territories or being able to attack through empty territories. I think currently we have some sort of hybrid with lots of edge cases.

I don't think whether you non-blitz move or blitz move out of a contested territory should make any difference on whether its captured. Both cases should be treated the same and in my opinion it shouldn't be captured in either one. I think of capturing as either entering a territory or ending moves there not blitzing out of one.

So I guess bottom line in my mind is that leaving a contested territory should never capture it. Territories are only captured on entering empty ones or ending moves in one and winning the battle.

So going through your examples:

So the infantry should be able to move out of Caucasus, and into Archangel, without conquering Caucasus, but with conquering Archangel (cus it is empty).
- Agree

The tank should be able to move from Caucasus to Novosibirsk, while conquering all 3 territories.
- Disagree. Caucasus shouldn't be captured by the tank.

I am undecided still on if you move the tank from Caucasus to a friendly territory, whether it should conquer Caucasus or not.  I am kind of leaning towards "no", since it feels like a retreat.
- It shouldn't conquer Caucasus.

And then still more undecided on if you move the tank from Caucasus to Archangel, whether it should conquer Caucasus or not.  It is kind of a retreat then an attack, but could be considered 2 attacks as well.
- It shouldn't conquer Caucasus.
Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

Black Elk
Another v5 test with the latest Jar. Zeroed it back to OOB conditions so I could see what the AI Axis would do differently from previous games. Japan Hard AI fought the good fight! This time instead of their battleship dying in the frozen waters off Alaska, it ended up in the Mediterranean! A fitting response to the KGF approach from Allies. They pushed their ground well across Asia, but had trouble managing my Ruskie tank wall in Caucasus, and my British tank wall in India. I'm a big fan of armor in v5, even if it seems expensive as all hell compared to earlier boards haha. Germany had a rough 4th round where they lost nearly every battle and failed to retake France from UK on a light trade, I thought about giving them a reroll, but the smack down was so thorough with the British defense that I had to let Churchill savor the victory. I was also curious to see how they would respond. G buttoned up for a round, and Japan sent some emergency relief, but it allowed me to set up a pretty decent Center wedge to support Stalin. We were able to stack Baltic States against G, but it took a good long while for USA to orchestrate a strong enough Atlantic presence to hold France. All the while Japan did their very best to go monster. It was a game of dancing stacks, around India and Eastern Europe, until I was finally able to shoot the Indian tanks north to hold Baltic States in force.

 Hard AI Axis managed to drag it out till about the 20th round, before the Allies were able to crack Berlin on the triple hit! Well done Hard AI

v5_AI_Axis_vs_Elk_KGF_round_20.tsvg

Fun stuff! With a decent bid, I expect they'll be even more entertaining, and I'm starting to fear the day when I can they learn to use their carriers and fully protect their transports, they will surely be a nightmare then!

Great work man

Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

Irinam
In reply to this post by redrum
redrum wrote
At the beginning of combat move, I have 3 units with canBlitz and have 2 movement in a territory with the territory effect 'noBlitz' owned by an enemy player but has no remaining enemy units. I move 1 of these units to an adjacent enemy territory and this causes the start territory to be conquered and is now owned by me. I then try to move the remaining 2 units to the same enemy territory (or any surrounding territory) but it won't let me move them giving me the message "Not all units can blitz". If I instead undo my first move and move all 3 units at once to the enemy territory then it allows it.
In a weird way this feels logical for me.

The territory has the effect 'noBlitz' so none 3 of your units really have blitz at all.
Now you can choose to move one or all of your units out , all right.

If you move only one unit out, the other two are remaining in an enemy controlled territory.
Now - perhaps - the engine registers the following:
The territory participated in a move of units and now there ARE units in an undefended territory.
So these must have been moved, the territory gets conquerd and you can no longer move the units there as THEY have conquered and do not have blitz.

Does this make any sense???


redrum wrote
So going through your examples:

So the infantry should be able to move out of Caucasus, and into Archangel, without conquering Caucasus, but with conquering Archangel (cus it is empty).
- Agree

The tank should be able to move from Caucasus to Novosibirsk, while conquering all 3 territories.
- Disagree. Caucasus shouldn't be captured by the tank.

I am undecided still on if you move the tank from Caucasus to a friendly territory, whether it should conquer Caucasus or not.  I am kind of leaning towards "no", since it feels like a retreat.
- It shouldn't conquer Caucasus.

And then still more undecided on if you move the tank from Caucasus to Archangel, whether it should conquer Caucasus or not.  It is kind of a retreat then an attack, but could be considered 2 attacks as well.
- It shouldn't conquer Caucasus.
I'm totaly with you redrum!

Conquering of territories should only happen if you move INTO them or when you are the only one with units in them at the END of Combat
Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

captaincrunch
This post was updated on .
Ook, I played a lot of matches. I tested the ai.jar before the last update and then you posted this current update so here's both updates tested.




I played 4 matches of the update before this and lost the 1st, lost the 2nd, won the 3rd and then won the 4th:



1st match: I was the Allies and the AI was the Axis and I forfeited my 1st turn with Russia for fun and I remember I got rolled and I think I quit at like maybe round 8 or 9.



2nd match: I was the Allies and the AI was the Axis again but this time I didn't forfeit my 1st turn with Russia and I think I had a good start and took the German AI capitol early but the Japan AI marched swiftly and I could not stop it and gave up maybe round 15.



3rd match: I was the Allies and the AI was the Axis again and I played well and beat the AI pretty smooth and ended the match in round 12;


latestaxisaidefeated12.tsvg






4th match: I was the Axis and the AI was the Allies and although I took the Russia AI capitol in round 5, I couldn't take the UK AI capitol until round 38! I then finally took the USA AI capitol in round 42. The USA AI and UK AI coordinated Navys very well to drag the match that long;


latestalliesaidefeated12.tsvg








I then played your latest ai.jar update and played 4 matches and lost the 1st, won the 2nd, lost the 3rd, and then won the 4th match:




1st match: I was the Allies and the AI was the Axis and I forfeited my 1st turn with Russia for fun and I even took down the German AI capitol early but I could not keep the Japan AI from marching into Africa and Europe and the Japan AI took out Russia and then liberated Germany and I gave up around round 10 or so.



2nd match: I was the Allies and the AI was the Axis and I didn't forfeit my 1st turn with  Russia and I pretty much rolled the Axis AI and took the German AI capitol in round 4 and then took the Japan AI capitol in round 14;

latestaxisaidefeated13.tsvg






3rd match: I was the Axis and the AI was the Allies and I played well and took the Russia AI capitol early and I built a hlaf decent German Navy to assault the U.K. AI capitol but I remember the USA AI snook Transporters that I didn't notice in North Africa into my German capitol and won a close battle and that screwed me and I couldn't recover and gave up the match in maybe round 12.





4th match: I was the Axis and the AI was the Allies and I played strong and kind of easily rolled the AI and took the Russian AI capitol in round 7 and then took the UK AI capitol in round 15 and then ended the match taking the USA AI capitol in round 17;

latestalliesaidefeated13.tsvg








Soooo, I didn't see anything obvious to improve the AI. In those 8 matches I think the AI actually lost maybe only 3 entire battles that it attempted (I use Low Luck dice for testing for sure). It's hard to know the personality of these AI's but it was maybe 2 or 3 updates ago where I noticed the Japan AI no longer attacks Hawaii on its 1st move. The AI for sure has a solid Navy and uses its Planes better and the AI purchasing is fine ... its more now strategy that would separate the AI from human players so not sure what you think the AI still needs but I posted my wins hoping it helps you with developing the AI in some way. I feel the map that I always play (WWII Classic) is very balanced and from that map we can see that playing Russia or playing Germany are the toughest challenges for the AI as so often we witness. Hasto do with those 2 countries location for sure and then Japan and the USA are in the best positions and then the UK would be about average toughness between all of them.



I will pay attention to what you update and try to see if it's something I can test on the WWIIClassic map. Once you have some kind of final AI then I will consider trying other maps to challenge battling it! Was fun and look forward to next installment!
Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

Veqryn
Administrator
In reply to this post by redrum
So, I can see your point of view, but in the interest of discussion I will say why it is currently coded that way.

If I have a unit with blitz that starts in an empty territory, I really have no way to conquer that territory AND move, even though I have lots of movement.

To me, the ideal situation would be that you use up 1 movement point to conquer the territory (without actually moving), which would then allow you 1 move remaining to continue blitzing or to move to friendly space, etc.

However, triplea doesn't allow this, which is why I went for the next best which is to conquer it as part of moving out of it.
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

Black Elk
In reply to this post by Black Elk
A v5 KJF game vs HardAI Axis using the fighter wall strategy. I was pleased to see how the Japanese stacked the home island and used their bombers during the endgame! Just look at all those bombers!...

Especially when they started bouncing their bomber force back and forth between Karelia and Caucasus to disrupt Allied fleet movements. The Western Allies were forced to buy a ridiculous number of carriers to hold against this bomber threat, and it basically tied the British down off the coast of France in sz 8 and prevented a move against sz 5. This even after UK and USA had the pacific income and africa to throw around. This Japanese bomber armada kept G viable in the north and I had to go with major carrier investment and transport spam with UK to hold the Germans in west at Berlin, and keep them away from Stalin while USA set up in the pacific. They held out for 18 rounds, even after the center wedge was secured for Russia, before the Americans took Tokyo!

v5_Hard_AI_Axis_vs_Elk_KJF_round_18.tsvg

Well done Axis AI
Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

redrum
Administrator
@Veqryn - I guess I would rather have the territory be "instantly" conquered at the beginning of combat move if units are in an empty enemy territory if you are gonna want it conquered for '0' movement. I just don't like that a territory is conquered when units leave it and in particular only when blitz units leave it.

@Black Elk - Nice game. Those are some huge fleets and air forces. Nice to see the AI keep theirs safe and position it well.

Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

Black Elk
This post was updated on .
Ok here is another v5 AI Axis goof, that the machine should learn from and never repeat! haha

The situation arose playing a KGF as Allies, and it illustrates a current AI weakness when defending their teammate's aircraft. Here Germany abandons the entire Japanese Airforce, worth some 72 ipcs. More than the TUV value though, it is the fact that they gave up their main Axis Airforce left on the board...

v5_Hard_AI_Allies_vs_Elk_KGF_German_goof_round_10.tsvg 

To an easy smack down by UK...

v5_Hard_AI_Allies_vs_Elk_KGF_German_goof_round_10_UK_response.tsvg

Up until then, HardAI Axis were doing quite well, punishing me for me some sleep deprived errors of my own. That's a lot of dead zeros though  ;)
Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

Veqryn
Administrator
In reply to this post by redrum
hm... the problem is that i specifically don't want a territory to be conquered by non-blitz units at the start of combat move.

i guess we can code that, but maybe i should start a thread on this separately first
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

RogerCooper
In playing an old Tactics Campaign scenario, I noticed the following problem. When income is high relative to total production capacity, the Hard AI builds all planes. (This problem used to come up with Medium AI as well). The AI should probably cap air builds at 50% if it is fighting a land war and build factories if it has extra money.
Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

redrum
Administrator
This post was updated on .
@Black Elk - That's a good save game. The AI currently has checks to avoid leaving its capital open but doesn't check for other factories or large stacks of allied units when choosing to attack. This is something that could definitely be enhanced as the AI probably should have left the maximum units in Karelia and only attacked with units out of Germany. This would definitely help though until the AI considers turn order there will still be situations where it chooses to defend units that it shouldn't as they could move before the enemy can attack and also defend against multi-turn attacks.

@Veqryn - I don't really see why you don't want non-blitz units to conquer the empty contested territory. Is it just that you want non-blitz units to only ever conquer 1 territory per turn? Personally I think contested territories should be an exception to that as it seems more natural for any unit to capture an empty contested territory at the beginning of combat move.

@RogerCooper - Can you upload a save game so I can take a look? Probably something to do with the unit set.
Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

RogerCooper
redrum wrote
@RogerCooper - Can you upload a save game so I can take a look? Probably something to do with the unit set.
autosave.tsvg
The Hard_AI is playing Russia. Eventually it builds a factory and some ground units, but basically it builds too many planes and has trouble against the Easy AI.
Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

redrum
Administrator
@RogerCooper - The issue is all the 1 value territories. The AI doesn't want to build factories on 1 value territories and is so far from the front that it decides planes are the best purchase. The issue would be fixed if it understood that each factory produces 5 units regardless of territory value then it would build factories close to the front. If you just multiply all the values in the game by 3 then it would run much better. Eventually I plan to enhance the AI to understand more production rule variations.
Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

Black Elk
This was a fun little game, where Axis AI took Moscow in the 5th round!!!

Of course I carelessly forgot to leave a blocker in Archangel... And wouldn't you know it, but those pesky Germans went and blitzed the Russian capital!

But then Axis still wound up losing, mainly due to Japan's inability to retain control of their rich money islands vs a late game Pacific action by USA. And due to a brazen landing by the Allies in Holland that the Germans just couldn't manage.

I thought I was sure to get rocked when I saw 8 German tanks blitz across Archangel to storm Moscow! Decided to play it out anyway, and see what the Axis AI would do. The British recaptured Moscow with their tanks immediately (another good reason to buy armor in India haha) and once Russia was back in the income game, Japan just couldn't get into position before the USN clipped their wings in the Pac... first seizing New Guinea, then Borneo, Philippines, and East Indies. All the while UK and US were launching Atlantic transports over to Europe. I'm still not really sure how Axis didn't blow this one wide open, given Germany's early success against the Russians.

Still, I was pretty excited to see those AI Tanks blitzing like champions! It was a brilliant blitz by the AI to steal the Russian purse, even if it didn't work out quite like they'd hoped ;)

v5_Hard_AI_Allies_vs_Elk_Moscow_recovery.tsvg
Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

Irinam
Black Elk wrote
It was a brilliant blitz by the AI to steal the Russian purse, even if it didn't work out quite like they'd hoped ;)
redrum, does the AI consider, how many PUs it can steal if it captures a capital?
Or does it just see: CAPITAL... yeah... I CAN get it...I want it...
Reply | Threaded
Open this post in threaded view
|

Re: AI Development Discussion

Black Elk
This post was updated on .
That's a good question. I think in that earlier game the real difficulty the German AI had was not putting more troops into Archangel on non combat. Instead they camped at Karelia. They could have had 19 ground and 3 aa guns right next to Moscow, and they could have landed 4 fighters and a bomber in either Baltic states or Bulgaria Romania, and been able to bring all that air into another Moscow battle the following round.

But instead of threatening to take the Russian purse twice (as most humans would), the AI allowed Moscow to be recovered. It would have been fairly easy to just stack Archangel, and give up Karelia for one round, while they secured the line on Moscow. And then retake, if not the following round, then shortly thereafter.

______

Here is a different sort of game. This time as Allies I played a split theater game, deciding at the outset that I would basically alternate between Atlantic and Pacific investments for the duration. This was pretty enjoyable as the HardAI fought well. Took 15 rounds to secure the honorable Victory.

I believe right now the VCs are not in the AIs calculations, but it still takes a fair amount of time for Allies to secure 10 for a round. There weren't any outright AI goofs that I could see, but Japan again had trouble keeping Allies out of the money islands. They will keep their fleet around for a while, but once they are matched in power, they like to retreat of Japan, and travel towards North America (presumably to prevent USA from building out of W. US.) Or course all it takes is a factory in Borneo and you don't really need W. US anymore. Factory strategies like this are fairly effective and creeping into Asia late game and then slow driving against Tokyo to achieve Economic ascendance vs AI Axis.

The machine doesn't have a strong way to counter it, since their drives against India are a bit slower out the gate than  a human Japanese player might try. And a human will do just about anything they can to keep the USA from stealing those 10 ipcs from Borneo, East Indies, and Philippines out from under them, but the AI seems to freeze up, and then sails to the other side of the Ocean to relax off Panama ;)

v5_Hard_AI_Allies_vs_Elk_Split_Theater_round_15.tsvg

This is the situation just a few rounds later. You can see that now, the D-Day stack prompts Germany to abandon 3 Japanese bombers in Ukraine, leaving them exposed to a UK fighter strike from Moscow. This is something I haven't seen the hard AI give up in a while, at least since a few jars back, but I caught it once again here. I imagine the Germans had a brain freeze, and the leaders of the Japanese bomber command all just committed Seppuku as a result haha

v5_Hard_AI_Allies_vs_Elk_Split_Theater_round_17.tsvg

Total Domination in 20 rounds using the split theater approach...

v5_Hard_AI_Allies_vs_Elk_Split_Theater_round_20.tsvg
1 ... 32333435363738 ... 63