function v = AI_info_content(p1,p2)
%
% AI_info_content - info content of alternatives
% Call:
%     v = AI_info_content(0.5,0.5);
% On input:
%     p1 (scalar): probability of alternative 1
%     p2 (scalar): probability of alternative 2
% On output:
%     v (scalar): info (in bits) in range [0,1]
% Custom functions used:
%     none
% Author:
%     T. Henderson, UU, 11/2002
% Method:
%      

if (p1 == 0) | (p2 == 0)
   v = 0;
else
   v = -p1*log2(p1) - p2*log2(p2);
end
