Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probability Calculation #126

Closed
ghost opened this issue Nov 5, 2017 · 13 comments
Closed

Probability Calculation #126

ghost opened this issue Nov 5, 2017 · 13 comments

Comments

@ghost
Copy link

ghost commented Nov 5, 2017

I am stuck, I want to calculate probabilities of the tiles before shuffling, after shuffling and whenever a new move is made. I am using Bayes' theorem, i have written my code for it, but now i am stuck where to make changings to monitor probabilities after every move including pass.
I need very serious help please.

Ahmad

@ghost
Copy link
Author

ghost commented Nov 5, 2017

please help me, i am stuck

@abw333
Copy link
Owner

abw333 commented Nov 5, 2017

Hi Ahmad, can you provide more details about the probabilities you are trying to calculate/monitor and how you are trying to calculate/monitor them? Perhaps an example would be helpful.

@ghost
Copy link
Author

ghost commented Nov 5, 2017

I am using bayes' theorem to monitor the probabilities. I have written a probability mass function to calculate probability.

dominoes_tiles = Pmf()

for x in [(0,0),(0,1),(0,2),(0,3),(0,4),(0,5),(0,6),(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(2,2),(2,3),(2,4),(2,5),(2,6),
(3,3),(3,4),(3,5),(3,6),(4,4),(4,5),(4,6),(5,5),(5,6),(6,6)]:
dominoes_tiles[x] = 1/28

print(dominoes_tiles)

Where i am stuck is this works as far as game is not started and all tiles are equally likely, as the game starts and dominoes are shuffled every player has their 7 tiles and probability of each tile becomes 7/28.
An artificial player when receive its tile will change its tile's probability from 7/28 to 1 (using bayes'theorem).
And for all the other tiles it will have probability as 7/21.

I want when tiles are shuffled , i could monitor probabilities.

@ghost
Copy link
Author

ghost commented Nov 5, 2017

I need very serious help, my deadline is ahead very soon.

@ghost
Copy link
Author

ghost commented Nov 5, 2017

screen shot 2017-11-05 at 10 10 15 pm

@ghost
Copy link
Author

ghost commented Nov 5, 2017

How to update probability when i specific tile is revealed.

specific_tile = Pmf(['AI Player 0','Player 1','Player 2','Player 3'])

print(specific_tile)

print("\n\n")

specific_tile['AI Player 0'] *= 0.25

specific_tile['Player 1'] *= 0.25

specific_tile['Player 2'] *= 0.25

specific_tile['Player 3'] *= 0.25

specific_tile.Normalize()

print(specific_tile)

@ghost
Copy link
Author

ghost commented Nov 5, 2017

Please tell me where to make changings and how? i am trying from many days.

@ghost
Copy link
Author

ghost commented Nov 6, 2017

I am waiting sir !!!

@pcattori
Copy link

pcattori commented Nov 6, 2017

@abw333 is presumably not being paid to maintain this repo and looks like this is a personal project. @AhmadBilal1989 you are not entitled to the repo owner's time or attention, though you can ask for it (and i assure you that politeness and realistic expectations will be appreciated).

Please refrain from making exorbitant demands. Rude users are a big reason why people who maintain open source code bases burnout

@BilalAhmadJavaid
Copy link

BilalAhmadJavaid commented Nov 6, 2017 via email

@pcattori
Copy link

pcattori commented Nov 6, 2017

@BilalAhmadJavaid You are welcome to offer monetary compensation for @abw333 's help, but he is not required to accept it. You can work that out with him.

@ghost
Copy link
Author

ghost commented Nov 6, 2017 via email

@abw333
Copy link
Owner

abw333 commented Nov 6, 2017

Hi Ahmad: unfortunately, I am quite busy and cannot help you with your personal project. That said, if you run into any issues regarding the usage of the dominoes library, please let me know and I will do my best to assist you. Additionally, you may find this repository's README and the full documentation (linked from the README) useful. Best of luck on your project.

@abw333 abw333 closed this as completed Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants