Tuesday, February 03, 2015

Back Again for a While...

I noticed today that this blog was no longer accessible.  It seems my gmail account was disabled and that took the blog with it.  Silly Google.  I may have to look into moving this into a more reliable provider.

In any event, I've been busy.  Personal update.  In 2014
  • I attained the Microsoft C# Specialist certification.
  • Wound down one scrum team at work, participated on another as a supplementary architect and then took over a third as primary architect.
  • Delivered presentations at work on Windows Phone 8 programming and Xamarin iOS programming.
  • Completed a Windows Phone 8 app and most of a port of the same to iOS using Xamarin.  Laundry timing utility.  Coming soon to the respective app stores.
  • Prepared for and survived a week long trip to Disney World with my family.

I'll likely keep this blog for personal comments, but I'm very likely to repoint coherentlite.com to a new blog if I use CoherentLite as a company name for the apps work.

My goals for 2015 are
  • Walk 10000 steps per day.
  • Work 4 hours per week on my apps and other interests.
  • Work 2 months (at 4 hours per week) on the PIC Guam AI proof of concept.

Labels: , , , , , ,

Sunday, November 06, 2011

Game Development Status 11/6/11

I am continuing to work on the prototype for the AI and UI for PC PIC-Guam. This weekend I wrote the evaluation function for the Fire Combat AI, hooked the AI up to the game system, and got the Japanese to conduct a Defensive Fire. I'm filling in around the edges now. The UI is not displaying color overlays to indicate the target hexes of the AI's fire combats. I also have some additional testing to do to make sure the game phases out of AI fire phases OK. After that I need to make sure the AI moves execute, and then I will change the game to have the AI run the US side.

My backlog (from Evernote) looks like

Finish the prototype
Write the Eval method
11/6/11 - 2 hours
Hand-calc the stat avg values
this was not necessary, as it is possible to calculate the values.
Write the allocation selection code
11/6/11 - 1 hour
Write code to apply the selected fire allocation and resolve the attacks
11/6/11 - 1 hour
Test to confirm that attacks occur and make sense: phase, AI runs, game resolves fires from selected allocation, player reviews results, phase again and results no longer display
Write code to move the AI's units.
Change the code to play the US side
Test the movement part of the code
Remove assault and reorg phases
Test to confirm that AI and player phase the game and that each phase has something real happening
Write code to detect victory conditions and display a victory message (turns/duration date of victory, victory conditions)
Add the full orbat for the first scenario
Test the first scenario
do I need to remove other (unused) phases ?
Write an installer including a EULA with full disclaimers
test on home laptop and dawn's laptop: install, uninstall, BVT (run 1 turn), full game to include victory conditions

Labels: , , , , , ,

Sunday, August 28, 2011

Game Development Status 8/28/11

Doing some work on the prototype for PIC-Guam today. I did an hour yesterday; trying to build some momentum. I am implementing a prototype AI.

Today I had to refactor some code pertaining to movement footprint generation in order to reuse it in the AI.

My first approach to this AI is brute force. I am traversing the phasing unit list, generating all possible attacks permitted by the movement footprint. For each possible attack (firing unit in hex X versus target unit Y) for a unit, create a new allocation (list of such attacks) containing that attack and recursively call the allocation method for the next unit. As an allocation is completed (by adding an attack for the last unit in the list), concentrate the attacks in the allocation so that all units attacking the same enemy unit participate in the same FireCombat. Then evaluate the allocation by summing average fire combat results for each attack. The top N allocations are kept, and the actual allocation is randomly selected from among the top N allocations. During movement phases, the selected allocation also determines unit movement: each unit is moved to the

This will produce a very large combinatorial explosion, especially for the full order of battle. The questions are whether it will work in the first place for the small Orote scenario, how slowly it will run, and whether the results are any good.

I can reduce the processing and memory requirements of this brute force AI in several ways. I can pre-calculate the movement footprints and attack footprints for each of the phasing units. I can sort those movement/attack footprints by descending size and reorder the unit list accordingly, minimizing the number of nodes in the notional graph of partial allocations. I can also prune the movement footprints by accounting for overstacked hexes and removing allocations from consideration that exceed a threshold. I think I can also remove allocations that result in very few attacks (for the US side). For the Japanese side I may have to increase the difficulty by min-maxing to select the most casualties inflicted versus the least casualties incurred within a subsequent phase or two. Also, the Japanese side will need to constrain their movement in order to fully occupy the current generated FEBA line.

I'll eventually have to add some additional code to split out a certain number of Japanese engineers to create fallback defensive works. I'll need to control movement of AAA units with separate code as well in order to reduce the effects of US air.

Labels: , , ,

Saturday, July 10, 2010

PIC-Saipan/Tinian Game Review Part I

Chris sent me a review copy of Pacific Islands Campaign - Saipan/Tinian at the end of April. I finally found some time to review it this week. (After the release date...sorry, Chris!)

The maps are beautifully executed and easy to read. The counters are good: the die cuts are crisp and well registered, and the counters punch easily with no separation. All the charts are well laid out and easy to use. There were a few minor typos in the rules book but, as I said, this was a preliminary copy. I pointed out all the issues I could find to Chris, and I'm certain the production copies have the necessary corrections.

I setup the Japanese counters on Saipan. This is a useful and necessary step for the Japanese player. Necessary, because you can't play the game without first setting up the counters. Useful, because it gives the player an idea of what can and can't be done.

Saipan Setup

The "center of gravity" of the Japanese units on the island is in the geographic center of the island, and near the northern beaches. The rules prohibit free setup of units except for three companies of naval troops, and only three fortifications may be placed on beach hexes, though a total of 18 fortifications may be placed on the entire island.

Northern Beaches Free Setup

Based on these limits, I would recommend a strategy similar to the de facto historical one. Similar, but not quite the same. Historically the Japanese fell back to the north and defended stubbornly. I recommend the same approach, but suggest it be done systematically. Place the three naval companies and the three permitted fort counters on the northernmost beach hexes. This is a forlorn hope as the odds are against those units surviving the amphibious assault phase, and the southern surviving unit will almost certainly be annihilated during the remainder of the turn. Still, these units will buy time. All units north of the lines of fortification counters head south, except perhaps for some engineering companies as described below. These units will be needed in the south early on anyway, so move all that are not needed to prepare fall back positions.

Fort setup perspective

Carpet the hexes from 3717 southeast to 3219, forming a line across the island. Do the same thing from 3817 to 3320. Place the last three forts on 3420, 3521, and 3620. Have all units south of that line fall back towards that line. Sacrifice a few units if needed to slow down the US advance. Have any engineering units in fortification hexes upgrade those fortifications the first turn. (Remember 3420, 3521, and 3620?) Engineering units will continue to pave the north half of the island with forts. Once arriving at the first east-west line of fortifications the US units should have to struggle against fortifications all the way to Marpi point.

Once the Japanese have consolidated to the north, always fight in the best terrain and under forts. Attrition is the key. Always keep six steps of units in each hex on the FEBA to ensure the hex will not be overrun. As long as you can feed units into the line, the US cannot advance. Try to channel the US units into clear hexes where possible to maximize casualties.

Don't place artillery in clear hexes in order to avoid counterbattery fire.

Consider falling back occasionally in order to provide subsequent opportunities for Defensive First Fire. Also fall back to shorten lines as casualties mount and to skip over clear terrain that does not favor the defense.

Always cause casualties. The odds are extremely against the Japanese player achieving the time limit victory conditions. Most likely, the US will be knocking on the door right around the timing in the historical schedule. The best the Japanese side can hope for is to cause enough US casualties to reduce the victory level, and perhaps cause enough caution in the US player to have a better chance of delaying past the historical outcome.

The final bit of advice I can give the Japanese player is to use Banzai attacks frequently and prudently. There is no US Defensive First Fire at night, so you can safely mass and shift units. The 3x attack factors multiple and the +3 die roll modifier for Banzai attacks allow you to attack stronger units or stacks with weaker units and still cause casualties. Consider having an engineer platoon with artillery support Banzai charge a lone infantry company in clear terrain. The odds will be about 1-2, and the net DR should be +4. This gives a 2/3 chance of eliminating a company with a platoon.

Next I will compare company counts, average attack/defense factors, and total steps for the Japanese and US forces. I will also setup the units on Tinian and write up some notes on that part of the battle. It may be some time before I complete this...check out my "command central" for working on these notes, especially the background.


Command Central

Labels: , , , , ,

Saturday, May 29, 2010

First PIC-Guam Video

I've started making some videos that demonstrate features of the prototype of Pacific Islands Campaign - Guam.

The first one covers phasing of the game turn.

The next one will cover basic unit movement in the prototype.


Labels: , , , ,

Wednesday, November 21, 2007

Game Development Status 11/21/07

I put in some work on the game for the first time in two months today. The game just hasn't been a high priority for me lately.

I updated the installer and tested it on a couple of laptops. I need to activate a copy of Vista before I can resolve Chris' issues with the installer.

While exploring the setup project, I found the View User Interface option in the context menu from the setup project node in the Solutions Explorer window. This provides a tree view of the installer dialogs, and allows for adding additional dialogs such as a EULA dialog, a Splash dialog, and a Read Me. Each dialog exposes a property allowing for configuration of the logo art displayed at runtime. This was exactly what I had been looking for over the course of many online and MSDN searches...funny how I had never found it before.

In any event, I should be able to activate Vista next week and hope to have a fix for the installer under Vista available for Chris presently. It may be a Merry Christmas indeed for the Beta group.

Labels: , , , , ,