Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4586466
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T21:38:35+00:00 2026-05-21T21:38:35+00:00

I did a search but didn’t really get any proper hits. Maybe I used

  • 0

I did a search but didn’t really get any proper hits. Maybe I used incorrect terms?

What I want to ask about is an algorithm for simulating a biased role rather than a standard supposedly-random roll.

It wouldn’t be a problem if you can’t give me exact answers (maybe the explanation is lengthy?) but I would appreciate &pointers to material I can read about it.

What I have in mind is to for example, shift the bias towards the 5, 6 area so that the numbers rolls would have a higher chances of getting a 5 or a 6; that’s the sort of problem I’m trying to solve.

[Update]

Upon further thought and by inspecting some of the answers, I’ve realized that what I want to achieve is really the Roulette Wheel Selection operator that’s used in genetic algorithms since having a larger sector means increasing the odds the ball will land there. Am I correct with this line of thought?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T21:38:35+00:00Added an answer on May 21, 2026 at 9:38 pm

    In general, if your probabilities are {p1,p2, …,p6}, construct the following helper list:

    {a1, a2, ... a5} = { p1, p1+p2, p1+p2+p3, p1+p2+p3+p4, p1+p2+p3+p4+p5}  
    

    Now get a random number X in [0,1]

    If

            X <= a1  choose 1 as outcome  
       a1 < X <= a2  choose 2 as outcome 
       a2 < X <= a3  choose 3 as outcome  
       a3 < X <= a4  choose 4 as outcome  
       a4 < X <= a5  choose 5 as outcome  
       a5 < X        choose 6 as outcome 
    

    Or, more efficient pseudocode

       if     X > a5 then N=6
       elseif X > a4 then N=5
       elseif X > a3 then N=4
       elseif X > a2 then N=3
       elseif X > a1 then N=2
       else               N=1
    

    Edit

    This is equivalent to the roulette wheel selection you mention in your question update as shown in this picture:

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I did search for this topic, but I didn't find any relevant clue for
I did a search but I didn't found anything . I'm looking for a
I did a search for an HsbToRgb converter in the docs but didn't find
I did a search on this, but didn't find a question that quite matched
Did a search, didn't find any issues on this. My application takes .csv files,
I did a lot search already but couldn't find a straight anwser. I have
I did a search on the elements of the list, but the problem is
I did a quick search, but couldn't find a specific solution to this (I'm
just to put it out there -I really did search and try to find
I have a problem I tried solving on my own, but didn't get far

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.