OverrideB1:
Yes, RAI isn't magic, it isn't new, and it follows the same logical steps as any computer program - "intelligent" or otherwise. It still isn't scripted in the sense that the term is used in game AI. Any useful division of AI into scripted and non-scripted techniques would put RAI in the non-scripted.
It doesn't directly use If ... Then ...
but rather something like:
Code:
updateDesires() //(for food, rest, gold, not being hurt...).
forEach possibleAction
forEach desire
actionUtility += ( desireLevel * actionContributionToThisDesire )
perform action with maximum actionUtility
That would be a very crude method to calculate a fairly good action. Hopefully RAI is a bit more complex than that (and more efficient). Clearly the updateDesires() function would need to be reasonably complex too: e.g. desire for food should increase dramatically when the NPC is near to starving. I imagine RAI also involves some randomness.
The above can be broken down into simple If ... Then ... statements (as can any computer program), but that is not how it is written. Calling something "scripted" means that it acts like a directed script - the programmer tells that NPC what to do specifically, under specific circumstances. With RAI, the programmer doesn't have such tight control. He instead gives the NPC a set of desires, a set of actions, then allows it to do as it pleases. The same could be achieved either way, but it's much easier to achieve higher levels of versatility and a wider array of possibilities with the non-scripted approach.
RAI is not new, though it is new to TES. It has certainly been overhyped, but it's still a big step forward.
Klinn said:
One thing that makes me worry is that apparently the NPCs’ AI is somehow switched off or reduced when the player gets a certain distance (number of cells) away.
I don't think the possibilities are reduced (mostly), just the level of detail.
For instance if an NPC feels hungry and is close to the player, he'll probably get up, walk to where he can find food - possibly getting input on the way / being delayed etc. -, then get some food (if he can). If the same NPC is in the same situation, but the player is two cells away, the game might not bother getting the NPC to walk - he might just get teleported to his destination. If the player is the other side of the game world, the NPC probably won't even teleport - it'll just be assumed that he went to get food and came back.
The effects of the processes should be about the same - they're just carried out in a simpler way. They probably won't be exactly the same, e.g. the teleporting NPC can't get attacked on the way to buy food. The economy might also behave slightly differently - if the player is the other side of the game world, it's unlikely that every NPC purchase / sale is tracked (though it might be - I'm guessing), rather each NPC is probably assumed to spend X per day on food etc., and each merchant to sell Y amount of goods, making Z gold... This won't be completely accurate, but it won't really matter.
They might go further than this though - there's been a lot of talk about it being undesirable for important events to occur without the player's presence (spontaneous battles etc.). It is possible, therefore, that NPCs might have a reduced set of possible actions when a long way away from the player - e.g. perhaps it is not possible for them to attack each other when a long distance away.
The low detail processes above probably don't include the possibility of NPC fights / starvation etc.