Thread Rating:
  • 3 Vote(s) - 2.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Round type vote
#18
Posting at ZeWaka's request. Heres some pseudocode for this thing.

Code:
# player_votes is a list of lists.
# player_votes[i] = list of round types the player voted for
# I assume that round types are treated as integers by the game

def select_round_type(player_votes):
    distribution = [0.0]*NUM_ROUND_TYPES

    if(rand(1,3) == 1):
        return old_select_round_type()
    else:
        for player in player_votes:
            vote_weight = 1 / len(player)
            for vote in player:
                distribution[vote] += vote_weight

    round_selector = rand_float(0,len(player_votes))
    for i in range(0,NUM_ROUND_TYPES):
        if(round_selector <= distribution[i]):
            return i

    return 0
Reply


Messages In This Thread
Round type vote - by Firebarrage - 04-30-2018, 02:21 PM
RE: Round type vote - by Drago156 - 04-30-2018, 02:31 PM
RE: Round type vote - by Firebarrage - 04-30-2018, 02:48 PM
RE: Round type vote - by Eibel - 04-30-2018, 04:12 PM
RE: Round type vote - by Frank_Stein - 04-30-2018, 04:21 PM
RE: Round type vote - by Ed Venture - 04-30-2018, 05:05 PM
RE: Round type vote - by Noah Buttes - 04-30-2018, 05:10 PM
RE: Round type vote - by Firebarrage - 04-30-2018, 05:26 PM
RE: Round type vote - by Frank_Stein - 04-30-2018, 05:54 PM
RE: Round type vote - by Kodos - 04-30-2018, 06:36 PM
RE: Round type vote - by Eibel - 05-01-2018, 06:59 AM
RE: Round type vote - by Dr Zoidcrab - 05-01-2018, 09:19 AM
RE: Round type vote - by Technature - 05-01-2018, 09:35 AM
RE: Round type vote - by Frank_Stein - 05-01-2018, 09:47 AM
RE: Round type vote - by Haprenti - 05-01-2018, 09:50 AM
RE: Round type vote - by Firebarrage - 05-01-2018, 09:53 AM
RE: Round type vote - by Wisecrack34 - 05-01-2018, 01:52 PM
RE: Round type vote - by Firebarrage - 06-08-2018, 12:22 PM
RE: Round type vote - by MrMagolor - 06-10-2018, 01:57 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)