MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
Re: [MUD-Dev] The laws of probability
[Chris L. on the laws of probability:]
: X is a random number from 0 - MAX_UINT.
:
: Y is the sum of all the char_weight_map entries which match type
:entries in type_list.
:
: Z is the sum of all the env_weight_map entries which match type
:entries in type_list.
:
: if (base_probability + Y + Z < X) then
: return 1
: else
: return 0
: endif
Looks pretty good to me! My only comment is that it might be more
programmer friendly if X ranged from 0 to some multiple of 100, so that
the Y and Z factors would be easier to get a grasp on - they could be
percentage values scaled by that same multiple.
--
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA
- Thread context:
- Re: [MUD-Dev] "From Kansas to Oz", (continued)
- Re: [MUD-Dev] The laws of probability,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Sat 10 Jan 1970, 03:27 GMT
- [RP] The thoughful player,
Jeff Kesselman jeffk#tenetwork,com, Thu 08 Jan 1970, 06:51 GMT
- Re: [MUD-Dev] Death,
Jeff Kesselman jeffk#tenetwork,com, Thu 08 Jan 1970, 06:31 GMT
[ Other Periods
| Other mailing lists
| Search
]