I1066
Posts: 77
Joined: 10/22/2013 Status: offline
|
Most of what is called AI has nothing to do with "Intelligence" at all. Basically what is called AI is a bunch of if-then-statements. That is, IF situation is A, THEN do action X. Now it turned out it was extremely difficult to write this IF-THEN-statements in such a way to get "intelligent behaviour", so someone invented "Machine learning". Machine learning is the concept of collecting data (often huge amount of data is needed), and then let a program analyze this data and automatically create a lot of IF-THEN-statements. This machine learning can work rather good, when you have good data that clearly describe all aspects of the process you want to be "intelligent" about. It's rather easy to do with games like chess where you have a record of just about every game ever played down to small clubs all over there world (you just have to find them). But it has nothing to do with "intelligence". An AI trained to play chess, can only play chess. And when you have a game like Command, where the parameters to consider range from the over all orders given for the scenario at hand (win condition), to the moral, bravery, and self preservation of commanders, captains and individual pilots, which should all be considered, together with the orders of individual units, when deciding how units react and what they decide to do under different circumstances. When considering all this, a 8x8 chess board with 16 pieces is a trivial matter to handle and solve. There is a concept called "Fuzzy Logic", which has proven to be rather good at generating good output where an Agent should consider several parameters at the same time. In short it is like a bunch of IF-THEN-statements, which all are considered at the same time and where each IF-statement can be true to a certain degree, that is, A = B can be "true" at the same time as A = (B+1) is true too ( I know it seem strange, this is the "fuzzy" part). You can think of it a bit like this, IS New Your City in New York state? ==> 1.0 IS Washington DC in New York State ==> 0.7 IS Dallas in New York State? ==> 0.5 IS Moscow in New York State? ==> 0.3 IS The Moon in New York State ==> 0.01 IS Orange a Fruit? ==> 1.0 IS Banana a Fruit? ==> 0.9 (berry) IS Salad a Fruit? ==> 0.5 IS Salmon a Fruit? ==> 0.1 IS a Car a Fruit? ==> 0.01 IS 42 = 42? ==> 1.0 IS 42 = 43? ==> 0.95 IS 42 = 1000? ==> 0.5 IS 42 = a Car? ==> 0.01 Now imagine that there were an AI module in Command for a fighter pilot using Fuzzy Logic, it could be something like this: Situation: * The pilot is part of an AAW patrol mission - Investigate contact outside patrol area: yes - Return to base on BINGO - Return to base on Winchester * The pilot is inside the patrol area * An unidentified contact was just detected 100 nm outside the patrol area, away from base * The pilot is close to Bingo fuel ( but enough to check out the new contact) * there are two other units in the patrol area, doing the same mission, both have more fuel * There are 2 ready units on the same mission at base * There have not been any hostile detected units within 300 nm "this area" * There are other bases not that far away * there are other airborne units in the air in "this area" * Some of those other units are AAW * Clear weather, no wind, cloud layer at 15,000' - 18,000' The Fuzzy Logic could be something like this... Do I currently have orders? ==> 1.0 Are there unknown contacts in range that I should check out? ==> 1.0 Am I low on fuel? ==> 0.8 Do I have more fuel than other doing the same mission? ==> 0.2 Am I closer than other mission units to the unknown contact? ==> 0.8 Am I alone doing this mission? ==> 0.33 Are other units in this mission engaged on any other task than checking out the new contact? ==> 0.0 Are any other unit tasked with checking out the new contact? ==> 0.0 Do I have enough fuel for checking out the new contact? ==> 1.0 (binary result) Are there any other units available to check out the new contact? ==> 0.8 Is my unit fully operational? ==> 0.3 Does the new contact pose an imminent and direct threat if it is an hostile AAW fighter? ==> 0.3 Does the new contact pose an imminent and direct threat if it is an hostile Ground attack? ==> 0.1 Does the new contact pose an imminent and direct threat if it is an hostile AEW? ==> 0.8 Are there ready units at base assigned to this mission? ==> 0.8 Are there ready AAW units at any base in range of the unidentified contact? ==> 0.9 Are there any airborne units between me and the unknown unit? ==> 0.7 Are there any airborne AAW units between me and the unknown unit? ==> 0.4 Are there any hostile air units within range? ==> 0.0 Do I have good sensors for identifying the unknown contact? ==> 0.9 Will the weather limit my ability to identify the contact? ==> 0.7 Do I have enough fuel for evasive maneuvers if needed when close to the unidentified contact? ==> 0.3 Will I reach BINGO fuel when performing the task of identifying the unknown contact? ==> 0.85 Is the unidentified contact using active radar? ==> 0.0 (binary) Have other hostile units encountered so far had missiles with longer range than the range I estimate I will need to identify the contact? ==> 0.2 Are the enemy known (intel) to have missiles with longer range than the range I estimate I will need to identify the contact? ==> 0.1 Is the unidentified contact on a course approaching me? Is the unidentified contact at a position and with a course, altitude and speed where we previously have identified civilian air traffic? ==> 0.2 Has it been a long time since the contact was detected without any unit tasked with identifying it? ==> 0.1 All these, and more, are checked, for each unit, whenever they should decide what to do. The result of each "question" is then, in a clever way, combined together to figure out if the unit should continue patrolling, or co check out the new unidentified contact. The point here is that all checks for all different things a unit can do is checked all the time, there should be no hard coded logic that, for example, always makes a unit engage a hostile unit within range, or even continue to attack a hostile unit with which is already engaged. Also this "Fuzzy Logic" should affect the behaviour when reaching Winchester and other such states. Perhaps the unit is the only one with a radar or other sensors that is needed in the area, and leaving right away would leave the other units blind, so perhaps it should hang around until there is another unit with the same capabilities in the area. Then we have the aspect of moral and courage, will a unit continue on a mission if it is a suicide mission? One cool thing with Fuzzy logic is that you could have a set of sliders to give priority over how prioritizations should be done. For example you could increase the priority of "Conserve ammo" if you are short on a specific type, or you could set the priority of a specific unit, so that all other would value that unit higher and be more protective of it. You could set the priority of "Allow high risk" to low, to make sure the units prioritize making it back home safe, or the opposite, if you want to make sure they do everything to complete the mission and less regard their own safety. It would be possible to have this Fuzzy Logic at several levels, you would have it for individuals like pilots, captains of ships and other units, but you could also have it for group commanders, base commanders and so on, they would all have their settings and priorities. This would also open up for the possibility of having historical commanders in charge of different things, where some are more aggressive than others and so on. The enemy AI would of course use the same system and you could set the difficulty level of the simulator by preventing the AI from always choosing the best option (perhaps by just doing the best thing 5% of the time, 2ed best thing 15% of the time, 3ed best thing 30% of the time, and so on...or something like that) /H PS And by the way, the AI for Dota is kind of similar to a chess AI, there are very few options and parameters compared to a game/simulation like Command. :)
|