Again in english: Problem with probability formula for gaming logic

Discussion in 'C++' started by Andreas Schmitt, Aug 4, 2005.

  1. Hi,

    Sorry for posting in German before, totally forgot about that when I was
    pasting this in here from another German newsgroup I was writing to, trying
    to get help

    I am programming a simple version of a soccer simulation
    The logic works like this so far:

    [GPG] = constant value goals/game

    every minute the chance for a goal is [GPG]/90.
    That goals is shot with probability X by Team1, with (1-X) by Team2.

    Right now X is set at 50%

    I'd like to build in a teamstrength formula now.

    I have a few ideas how to do so already, but I'd like to check some
    probabilities mathematically first but
    I am afraid my maths in that area isn't good enough really.

    Maybe someone can help me and write up a formula for me and maybe even
    explain it a bit:

    On the basis of the system descibed above, GPG/90 probability for a goal per
    minute with X% to Team 1 with 1-X% to team 2 - with what probability wins
    team1, what probability for a draw and what probability for team2 winning.
    I need a formula for that which depends on GPG and X

    A first try that I made to approach this problem seems to be faulty
    somewhere:

    Probability for Team1 winning while shooting exactly 2 goals:

    X = probability for Goal by Team1 per minute (here 2,855/90 * 50% = 0,01585)
    Y = probability for no goal per minute (here 1-(X+Z) = 0,9682778)
    Z = probability for Goal by Team2 per minute (hier 2,855/90 * (100%-50%) =
    0,01585)

    In 2 of 90 minutes Team1 must shoot a goal

    => X^2

    In 87 of 90 minutes no goal must be shot, because either Team1 will have
    more than 2 goals or doesn't win

    => Y^87

    In the remaining 1 minute can either fall no goal or one for team 2 as long
    as the goal count of 2 for team1 doesn't change by them shooting one

    => (Z+Y)^1

    Probability total = X^2 * Y^87 * (Z+Y)^1

    That seems so be wrong though since the value makes no sense.

    Any help is apprechiated and if possible please not just hints but the full
    formula. This is not for a test or something if you
    might think that, it's not even for the game itself, it's just something
    that would really help me trying to balance the logic of the game by
    calculating a few possible ways of programming it before implementing them.

    Thanks
    Andreas Schmitt, Aug 4, 2005
    #1
    1. Advertising

  2. Re: Again in english: Problem with probability formula for gaminglogic

    Andreas Schmitt wrote:
    > Sorry for posting in German before, totally forgot about that when I was
    > pasting this in here from another German newsgroup I was writing to, trying
    > to get help
    >
    > I am programming a simple version of a soccer simulation
    > The logic works like this so far:
    >
    > [GPG] = constant value goals/game
    >
    > every minute the chance for a goal is [GPG]/90.
    > That goals is shot with probability X by Team1, with (1-X) by Team2.
    >
    > Right now X is set at 50%
    >
    > I'd like to build in a teamstrength formula now.
    >
    > I have a few ideas how to do so already, but I'd like to check some
    > probabilities mathematically first but
    > I am afraid my maths in that area isn't good enough really.
    > [..]


    Sorry, Andreas, but what does it all have to do with the Standard C++
    language, the subject of this newsgroup? If you need help with figuring
    out probability, post to a mathematics newsgroup (sci.math.*), if you need
    a general algorithm help, comp.programming should be your choice. Only if
    you have a C++ _language_ question should you post here, please.

    V
    Victor Bazarov, Aug 4, 2005
    #2
    1. Advertising

  3. Re: Again in english: Problem with probability formula for gaminglogic

    Andreas Schmitt sade:
    > Probability total = X^2 * Y^87 * (Z+Y)^1
    >
    > That seems so be wrong though since the value makes no sense.
    >
    > Any help is apprechiated and if possible please not just hints but the full
    > formula. This is not for a test or something if you
    > might think that, it's not even for the game itself, it's just something
    > that would really help me trying to balance the logic of the game by
    > calculating a few possible ways of programming it before implementing them.
    >
    > Thanks
    >
    >


    Maybe comp.games.development.programming.algorithms is a more
    suitable newsgroup. Or a general math-newsgroup.

    Tobias
    --
    IMPORTANT: The contents of this email and attachments are confidential
    and may be subject to legal privilege and/or protected by copyright.
    Copying or communicating any part of it to others is prohibited and may
    be unlawful.
    Tobias Blomkvist, Aug 4, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UmFlZCBTYXdhbGhh?=

    English/English DLL

    =?Utf-8?B?UmFlZCBTYXdhbGhh?=, Oct 15, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,655
    =?Utf-8?B?UmFlZCBTYXdhbGhh?=
    Oct 16, 2005
  2. IchBin
    Replies:
    1
    Views:
    750
  3. Replies:
    0
    Views:
    297
  4. Jeff Rush
    Replies:
    0
    Views:
    258
    Jeff Rush
    Feb 18, 2007
  5. RavenCross
    Replies:
    0
    Views:
    346
    RavenCross
    Feb 18, 2005
Loading...

Share This Page