From: El Paso, TX
To hopefully move the discussion in a more positive direction, here are two things which I find to be particularly encouraging:
1) Decision Points:
There are 143 decision points in the sequence of play where the AIO needs to decide what to do. 122 of these use universal logic, in that they do not depend on which major power is making the decision (e.g., rail moves, strategic bombing, naval interceptions, placing partisans). For the other 21, the logic does depend on which major power is making the decision. Examples of those are: strategic plans, declarations of war, production plans, and trade agreements. I have 200 pages of text describing strategic plans. Each major power has their own section and the plans are well organized. For the French, I’ve started encoding their strategic plan as data.
For the 122 ‘universal’ decision points, I start by writing plain text that describes how the decision is to be made. I’ve done 73 of them as plain text so far. The second step is to translate the plain text into a LAIO script. All of that work remains to be done.
Comment: Since over 85% of the decision points are "universal", that consolidates a lot of the AI code. When the same subroutine utilized by the US is also used by Germany (and everyone else), that should greatly reduce the coding effort. It also means a fix for one is thereby a fix for all. Furthermore, 60% of the universal subroutines have already been created, just not coded.
2) AI Code Runs "in the background":
Another change I made for NetPlay, that has direct bearing on the AI Opponent code, was that I created a separate thread to run some code “in the background”. It is a minor technicality but I am happy to now have a working example of how to code background threads using Delphi. Virtually all the AIO code will execute in separate (i.e., background) threads. The intent is to have the AIO figure out what to do, while its human opponent is moving and clicking the mouse and using the keyboard. When the time comes for the AIO to decide something, it should be able to do so quickly.
Comment: To me, this is HUGE. In most strategy wargames, you have an IGO/UGO system where the human player completes their turn, and THEN the AI starts processing. In WIF, most of that processing will go on DURING the human players turn. So not only will the computer turns appear to proceed more rapidly, but it also means the code can be written to do a LOT of different things without having to worry about imposing huge delays during the computer-player's turn.
< Message edited by Kull -- 5/15/2017 7:31:36 PM >