... partly derived from the hit points of the monsters killed, but much of it is at the discretion of the Dungeon Master. He can assign bonuses for solving riddles, solving traps, good role-playing, and so on, and penalties for stupidity, of course. I remember telling one guy (playing a female cleric) who had just had his character do something rather crass that his character's God was displeased with her, and she would have to do a month's penance in a nunnery - which was a fortnight's journey back down the road. She was therefore absent from the game for 2 months game-time, and missed out on a very lucrative little sub-adventure. The player himself was able to play an NPC cleric during that time, but of course his character got no experience from it, and only whatever goodies the rest of the party felt like assigning her (which wasn't much). He (the player) quit the game soon afterwards.The way I do the scoring is first to devise the game's basic structure, then to decide what level party to start with (usually around level 3), and what level the party should be at the end. I then populate the game with the appropriate number and toughness of monsters, work out roughly how much each character is likely to get, and then adjust the gameplay and completion bonuses to suit. It never quite works out like that, of course. Some bonuses are not handed out because (say) a trap has been "brute-forced" (with damage to the party) rather than solved, and some adventitious bonuses are usually given for doing something especially elegant - often something that the Dungeon Master hadn't thought of!
My present game has gone through the first two scenarios of either 8 or 9 - I haven't quite decided yet - and the party is level 7.