Monday, December 27, 2004

Game Development Status 12/26/04

Monthly total ~30 hours; yearly total ~373 hours.

Merry Christmas, y'all!

I had a good holiday. Did the family thing, did the gift bit, consumed mass quantities (but lost weight due to exercise and the Playstation 2 diet). Good news: Eylau is getting closer and the gal I was dating stopped dating me. Bad news: I got an XBox for Christmas and I'm going to start dating someone else.

OK, here's the current status. I am now able to get the AI game to play all the way through using the Assault of VII Corps scenario. The AI actually does stuff. VII/1 and VII/2 move towards Anklappen along with the Corps headquarters. Attacks are made, artillery and infantry fire is conducted, and the infantry assaults (they attempt to do so rather often, but close pretty infrequently, as you might expect given strict adherence to the version 4 regs). Regroup movement occurs. There was an involuntary breakdown to battalions due to casualties. Current problems include:
  • Units fire to the rear and infantry units fire further than one hex sometimes.
  • Major problems with divisions maintaining line of advance formation when not in contact.
  • Artillery units out of command radius do not regroup back to their commands.
  • Regrouping units blocked by the artillery units listed above do not go around the obstructing artillery.
Time to put these guys on maneuvers. My next couple of sessions will involved increasing the amount of data tracked on a per-friendly-unit basis by the AI and providing more information in the AI Debug dialog. This will let me diagnose plotting problems without stepping through the code. Then I will make a new test scenario for Assault of VII Corps and the Opening Moves that have only Coalition leaders, so that I can make unopposed test runs. My goal is to get the AI moving to contact in an orderly fashion, with divisions keeping units together in formation, and Corps keeping divisions in formation. I also need to fully implement reinforcement movement.

After that, I need to switch over to the Coalition side and get the AI to perform defensive tasks.
After that, I need to get both offense and defense to do a number of things:
  • Consitute, commit, and reconstitute a reserve.
  • Perform flanking maneuvers.
  • Work with a variable FEBA (required for the larger scenarios in which there are initially unreachable victory locations). Fortunately, we can do most of the AI work without worrying about this, just by testing with the Assault of VII Corps and the Opening Moves.
  • Cleanup code, fix memory leaks, handoff to Chris for creation of the Beta installation CDs.
In my opinion, we can go into Beta without the reserve, flanking maneuvers, or variable FEBA. Without those parts, the AI should still be playable in the Assault of VII Corps and the Opening Moves, and PBEM and hotseat are available. We can continue to finish the AI for the larger scenarios during Beta. We'll see what happens.

I have already put in for vacation on January 14th, 28th, and February 11th, so that I can take 3-day weekends to work on the game. I have a couple of vacation days in reserve, plus enough time to attend Origins.

Monday, December 20, 2004

Game Development Status 12/20/04

Monthly total 24.5 hours; yearly total 366.5 hours.

I had to remind myself tonight that the goal of heuristic search is to quickly reduce the search space by means in order to complete the search at least somewhat faster than an other (brute force) approach.

I was implementing a version of A* limited by the movement points available to a slow unit, the assumption being that a unit might not have sufficient MP to reach the destination hex. This lead me to give some thought to the road heuristic function, which I had avoided implementing to this point. I was reviewing my previos train of thought on the subject: when I have an opportunity to path into a road hex, I change the unit's formation to road and move faster along the road. I had always got stuck when it came time to leave the road again...I couldn't come up with a way to estimate H for a path that entered the road and later left the road.

Here's the thing that occurred to me: the heuristic doesn't have to be perfect, it just has to be admissable (i.e. less than or equal to the actual cost of the possible move). OK, my heuristic will be to assume that the unit will move all subsequent hexes at the road movement rate. This will tend to underestimate the actual cost and it will bias movement in favor of road marches. I'm willing to live with that for now. I can reduce excessive bias later, but for now, I move on.

Saturday, December 18, 2004

Game Development Status

Monthly total around 20 hours, yearly total about 363 hours.

I am currently working on a few bugs that Chris told me about. I am hunting for bugs by playing the AI game without moving the human side, and seeing what breaks. So far I have got the game to go to turn 8 movement plotting in the Opening Moves without breaking.

Actually, it's pretty cool to see it go that far. Remember the old electric football games? Once you put your players on the board and turn it on, they just tend to go all over the place? The AI is a lot like that right now. There are gaps in the code for regroup, reinforcement, and higher echelon leader movement that cause most commands to move onto the board a full move and stop. Still, the commands are moving in the right direction, charges and assaults are executed, and fire is exchanged.

I will continue hunting for bugs until I can run a no-human-move AI game of the Opening Moves to completion. This is pretty exciting stuff for me. We are getting close.

By the way, I put copies of the Rulebook and the Battle Book on the GSI beta test forum.

Saturday, December 04, 2004

Game Development Status 12/04/04

December monthly total 3 hours; yearly total about 346 hours.

November totalled 25 hours. Not nearly the level of effort I wanted, let alone the level of accomplishment. I got pretty sick the week of Thanksgiving and only completed about 10 hours of work the whole week. Bummer.

I am currently working on movement code for the AI. This code deals with CP's and MU's and the like. The latest two bits of work I am doing involve kedging code and code to move the Army-level leader unit.

Kedging is pretty important in the game. Kedging refers to moving out of command units toward their leader unit when the regroup chit is drawn. Kedging also refers to the practice of taking advantage of regroup moves in this fashion to move more units than one normally could given the available CP's. For the most part, I am writing code for the AI to kedge units in order to get them back in command. Later I'll write higher level AI code to use kedging like a player, i.e. to plot the leaders one turn so as to create a kedging situation the next.

One of the recent bugs I fixed was one in which CP's allocated to Corps did not cause the Corps' Divisions to move. Once I fixed this bug, I realized I was lacking a means of moving the Army-level leader unit. I was testing this fix with a test scenario based on the Opening Moves, which only has Soult and IV/2 on the French side and di Tolly and the 8th Division on the Coalition side. The test scenario effectively had Soult as the highest level leader in that game for the French, and the AI never moved him. So, I must write some code to move the Army-level leader. This gets interesting, because there are several ways this could go.

At present, I feel I have a good grasp on where to locate Division and Corps leaders. A Division leader will be located at the center of the line, stacked with one or more units. A Corps leader will be located with the Division currently designated as the main effort. (At least he will be once I complete the code to identify the main effort.)

Still, where to locate the Army-level leader? It strikes me that the two main choices here are to a) lead from the front, or b) stay in reserve. Given the relative immunity that leaders enjoy in the game system, lead from the front may be the way to go, in which case all I need to do is locate the Army-level leader with the main effort Corps and probably the main effort Division within that Corps. As the main effort Corps (and Division within that Corps) changes, shift the leader. The more I think about it, the more I think this is the way to go. A high level leader stuck with the reserve does little good; as the reserve is committed (and likely becomes the main effort for a time), the leader can join that command.

It may be necessary to bias the location of the Army-level leader to conform to historical practice. For example, did Napoleon stick with the Imperial Guard? I recall reading of many cases in which he lead from the front, and the historical notes and some of the scenario rules regarding the Imperial Guard imply their use as a reserve. (Thinking out loud a bit here.) OK, for now, I will have the Army-level leaders on both sides lead from the front (versus stick with the reserve -- of course, the main effort in a defensive situation may not be a command in contact, so I think I'm still OK). It's the easiest thing to implement, and I think it might actually work well. If this doesn't hold up well in Beta then I'll do something else.