Some ideas for NSD AI (to NORB)

Let's talk about Gettysburg! Put your questions and comments here.
Post Reply
Hancock the Superb
Reactions:
Posts: 1436
Joined: Thu Aug 21, 2008 9:06 am

Some ideas for NSD AI (to NORB)

Post by Hancock the Superb »

Norb, I've been reading your blog posts on the Home Page and noticed that you're struggling with regiments moving in front of each other while firing. How about making a box rifle-range-long and regimental width wide and designate it as a NO GO BOX (for friendly AI). Then, we don't have to worry about troops going in front of each other (a much better reason to not using the TC button).

Along with that thought, how about some new orders (assuming that you choose not to take my idea of typing out orders and the AI interprets them). A HOLD (Hold at all costs), DELAY (Delaying action, continuously falling back), DEFENSE (Normal defense, falling back if it gets really hot), TERRAIN DEFENSE (Defense which incoperates using the defensive bonuses and height bonuses), SKIRMISH (Figure out enemy's strength and/or draw them in to your main line), PROBE (Short attacks, mainly to stop an enemy advance or keep them on edge, flank attacks), GENERAL ADVANCE (A mild form of attacking, pressure the enemy), ATTACK (A drive forward to a specific point), and GENERAL ATTACK (An attack to break a line (Pickett's Charge)). Finally, two more. RESERVE (to be able to be called up if their commander is of needing them), and REAR GUARD (to protect roads, keep the enemy as far away from them as possible (500 yards - maybe)).

I hope that you will take these parts into consideration, for they would eliminate a huge need for the TC button!

This would make the AI very smart and create awsome battles!

I hope you like this!
Hancock the Superb
User avatar
norb
Reactions:
Posts: 3778
Joined: Mon Nov 26, 2007 9:59 am
Location: Central Florida
Contact:

Re:Some ideas for NSD AI (to NORB)

Post by norb »

I'm more struggling with the code than the concept, but thank you.

This code is called very often, so it has to be fast. That is the hardest part. Pathfinding is slow, but pathfinding must be done if units are going to move around each other. Therefore when in the heat of the battle, little paths must be found constantly. So I must keep it to a minimum. I also cannot just block where other units are, I need the "killbox" blocked as well so that units don't march into the line of fire. I also need to block the destination of units so that two different units don't march to the same spot.

So I'm working on all of the above with the distinction that it has to be VERY fast.

I know that everyone would like definite orders. For example "HOLD AT ALL COSTS". But that's not the way I designed the AI. The orders you give to the computer as more or less suggestions that they really want to follow, but sometimes can't. It must be better than it is, I admit that. I don't want this to be an RTS, and to me that is the trait of the RTS, the units just do what you tell them. So HOLD should hold, but different levels of men and officers will determine that the spot is over run at different times.

As soon as I get this pathing stuff done, we'll most onto these items.
Hancock the Superb
Reactions:
Posts: 1436
Joined: Thu Aug 21, 2008 9:06 am

Re:Some ideas for NSD AI (to NORB)

Post by Hancock the Superb »

Good luck, and thanks.
Hancock the Superb
Jim
Reactions:
Posts: 1082
Joined: Tue Nov 27, 2007 8:53 am

Re:Some ideas for NSD AI (to NORB)

Post by Jim »

We are adding more general orders roughly along the lines discussed above. As Sickles so clearly demonstrated, generals do not always follow orders, no matter how sensible. We are trying to build in that human fallibility to make the AI just that little bit more like the actual commanders.

-Jim
"My God, if we've not got a cool brain and a big one too, to manage this affair, the nation is ruined forever." Unknown private, 14th Vermont, 2 July 1863
User avatar
norb
Reactions:
Posts: 3778
Joined: Mon Nov 26, 2007 9:59 am
Location: Central Florida
Contact:

Re:Some ideas for NSD AI (to NORB)

Post by norb »

Actually Jim's reply here got me thinking. Every step of the way I try to think about what I did before and what I liked and what I didn't like. Then I try to get that to happen. But that's just the first cut, my cut. Fact is that it's much easier to comment on something you see, than something you can't. So when I get something that's playable, it goes to everyone else. Jim listens to the comments and let's me know what he wants changed. What I try to do is make it so that the first cut is flexible, so that changes are as easy as possible.
Hancock the Superb
Reactions:
Posts: 1436
Joined: Thu Aug 21, 2008 9:06 am

Re:Some ideas for NSD AI (to NORB)

Post by Hancock the Superb »

Yes, I agree with Norb and Jim about the orders. Different commanders should have different ideas of what each order is.

However, looking at the toolbar in TC2M - all you have done is advance the commander's style a point or two up or down from where it was, depending upon hold, defend, etc. I would like to see some coding into this part, where the AI actually sets up a defense, holds the position, attacks PROPERLY, not regiments just going forward, seeking the flank, delaying, etc. In the Defense Terrain, the commander should seek out the best terrain in the vincity (time permiting) and move his units there. For example, in TC2M division tutorial, I've stationed my brigades along the fence, and when an enemy gets close, the brigade commander swings his brigade around, LOOSING the defensive bonus for no reason. The commander should be able to sense if he is going to be flanked, and move over appropiately. In addition, during an Attack, brigades charge in whatever direction they want, paying no attention to keeping the brigade together.

All this causes me to TC every brigade in TC2M, even if I'm playing Army Commander. This generally sucks during attacking. So, I'm proposing that we upgrade the AI to an almost person level of making decisions, a smart AI, not a programmed AI that follows a set of rules.
Hancock the Superb
Post Reply