>>7 The above example can described as following pseudocode
It use weighted response array and random choice.
routine AIchoice(event A){
S=get_array(responses_for_A);
S2=get_array_weights(responses_for_A);
pick_random(S[S_Element],totalweight/avgresponseweight);
set_choice(choice,S_Element) ;
execute(S_Element);
}
if(is_response_successful){adjust_addvalue(S_element,weight_choice_add)}else{adjust_subvalue(S_element,weight_choice_substract)}
__________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum:
http://etastrum.phpbb3now.com
Peace cannot be achieved through violence, it can only be attained through understanding.