如何為具有多個參數的函數實現動態編程?


13

Dynamic programming is a technique for avoiding the repeated computation of the same values in a recursive program. Each value computed is immediately stored. If the value is needed again, it is not computed but simply looked up in the table. a2020_0

我在工作中經常使用orthogonal polynomials。由於 Mathematica 僅支持the classical ones,因此我經常不得不編寫自己的函數。例如,單項Charlier多項式滿足三項遞歸

$$ C_ {n + 1} ^ {(a)}(x)=(xan)C_n ^ {(a)}(x)-C_ {n-1} ^ {(a)}(x)$$

$ C_0 ^ {(a)}(x)= 1 $和$ C_1 ^ {{a)}(x)= x-a $。

如果我想能夠在 Mathematica 中使用Monic Charlier多項式,我可以這樣做:

CharlierC[0, a_, x_] := 1;
CharlierC[1, a_, x_] := x - a;
CharlierC[n_Integer, a_, x_] := (x - a - n + 1) CharlierC[n - 1, a, x] -
                                 a (n - 1) CharlierC[n - 2, a, x]

這條路線的問題當然是,用於生成例如CharlierC[20, a, x]的精力不能用於評估CharlierC[50, a, x]。對於單參數遞歸函數(例如Fibonacci),動態編程既精巧又精巧,可以節省評估工作。對於多參數函數,想像一下如果使用定義CharlierC[n_Integer, a_, x_] := CharlierC[n, a, x] = (* stuff *)然後執行Plot[{CharlierC[5, 1, x], CharlierC[6, x, 2]}, {x, -1, 1}]會發生什麼。

是否有一種方法可以利用多參數函數的動態編程優勢,同時僅存儲遞歸變量(在Charlier示例中為n)更改的結果?

3

I am not a lawyer, but I suspect you don't have any recourse against a free-to-play site like Zynga. They would need to be licensed by a third party, and you would then seek redress with that third party.

Most real money sites are licensed by some sort of third party, generally a government office such as a gaming commission. If you suspect a real money site of cheating, you would need to work with the licensing party for that site. For instance, if RealMoneyPokerSite was based in Nevada, you'd need to work with the Nevada gaming commission for any recourse you would seek. If you don't feel that the Nevada gaming commission will do a proper job protecting players, then you need to take that into account when depositing money with RealMoneyPokerSite.

Lastly, I don't think Zynga has bots playing the games. They deliberately steer players towards tables that will put most of their chips on the table at once, and play on Zynga is very loose. It is a very high variance environment, and if you play with most of your virtual bankroll on the table at any one time, you will go bust a lot. Don't put more than 5% of your bankroll on the table at any one time, favor strong starting hands, and you will come out on top. Don't play speculative hands (suited connectors, lower pocket pairs) for any decent raise preflop. Don't go all in preflop with lower pairs - TT isn't that strong when you've got 4 other people calling with any broadway + rag.


18

First let me point out I believe this is exceptional: it is definitely not the rule. Most importantly, I believe the big online sites are fair (and I won lots of money there ; )

I point this out because I won't fall and I'm not going to spread the paranoia: "zomg, all poker sites are rigged". Because they're not. Most of them are fair: they're winning enough millions with the rake and buy-ins fees so that they don't need to jeopardize their businesses by being shaddy.

Is it possible to detect?

Yes. Definitely. Such behavior (rogue sites) has been detected in the past and players did force shaddy sites to admit they had: superuser accounts, rigged random number generators, etc.

It's however very hard to detect and you need very, very, smart people to be able to analyze gigantic amount of hands and prove the wrongdoing.

Do you every suspect any site like this?

Yes. I won't give more info. That particular site is down now.

Can we take any legal action apart from quitting from the site?

Yes, but you'd probably need to team up with other players who've been deceived. There's one underway now: several players are claiming, under the RICO act (where you can claim up to 'x' times your losses), several millions of dollars to the company who operated Absolute Poker / Ultimate Bet (these online sites are down now).

Here's one link to that "recent" (as I type this) lawsuit:

http://investigations.nbcnews.com/_news/2012/01/20/10194014-poker-players-sue-to-get-to-the-bottom-of-online-cheating-scheme

That said, if you could prove something like this and if the site were to operate under a licence, you probably could also contact the organization in charge of issuing the licence and complain there. For example if you were to detect that one french site is blatantly cheating and if you can back up your claim, then you could contact the "ARJEL" and they'd probably take your research very seriously.


1

I would like to strengthen the other answers here. Yes, its possible to detect such sites but its very difficult.

Its most likely that you face two (or more) players in the table that share their cards and cooperate (using Skype or any other SW). To reduce the chance of being cheated like that, play multi-table tournaments.

Regarding BOTS - don't forget that someone inside the company should write and manage those BOTS programs. People will know about and its too much of a risk for the site.

Amigal


1

It is a little bit of a side topic.

I'm not justifyin it, all the contrary, but I guess that sites like Zynga may not be subjected to any license/regulation. From some point of view they can be considered more like Farmville and the sarm of idle games. You pay some money to play with them, like you pay some money to enter a cinema.


-1

There is little you can do without proof, you need a large glut of data and the statistics to back it up - or insider access.

On a sidenote those proclaiming RNG (random number generators) to be regulated/unregulated seem to of missed the point - you cannot program randomness, there is a set pattern and an unnatural deal occuring with any poker played online - the scope for companies to alter code to their benefit (either through more rake, players losing and pumping more money onto a site, etc) is huge.

Anyone who argues they don't need to, they make enough money needs to remove their head from the clouds - greed, wealth and power do not care, the more they can make, the more they will make. Action flops are so common with online poker it is untrue and the amount of hands that encourage 2/3/4 players to throw in chips is seriously slanted. It is difficult to prove and, more importantly, there doesn't seem to be an impetus to actually investigate the companies more fully. If you read the small print in the terms and conditions for any online poker site then it might make you think twice before using it again.

As for Zynga lol! Rigged hands, rigged tables, set-up hands for 'action' purposes, possible bots, large amount of people cheating either being able to see others cards, giving themselves tons of free chips, having multiple accounts playing one table or being able to actually manipulate play (those who have experienced a freezed game followed by a ridiculous turn & river giving an opponent a win will know what I mean). Bottom line: give Zynga none of your money, ever!


3

Bots, if they are run by the host, still have to perform effectively. Lots of research into this via University of Alberta poker AI group describes just how difficult this is. I'm sure it's against almost all sites T&C's to allow bots on their networks so I'd say it's very unlikely, if not too difficult to be wothwhile.

As for the cheating aspect, it seems that whatever the quality of evidence that is released the debate never stops. It's like a zombie that keeps coming back, no matter how many times it's killed!

As I mentioned in a comment for another answer on this thread, Stars published the results of it's RNG audit here by a company called Cigital who specialize in software security. Also...

...provides more independent analysis on hand distribution data. Both analyses show that online poker is fair. At least in that instance ;)


-1

Zynga Poker is a free-to-play game where you get given a certain amount of virtal chips when you create your account.

Since starting I haven't spent a single dollar of real money and I have managed to accumulate over $2million in chips, then lost nearly all of it and then get it back again. After a long string of bad luck I am now sitting on around 300,000.

So maybe I'm very lucky? I don't know. I don't consider myself a very good poker player in general as I often lose all my chips and lesve the table when playing with real cards and chips in real life.

It does not appear that the Zynga server cheats. However I often suspect that man of the users/players cheat. As many times I have seen people go "all in" before the flop and get a flush or straight etc.; and it's not pure luck, because they're doing it multiple times in one sitting. This prompted me to do a little bit of investigation - I googled "Zynga Poker cheats" and saw that there were quite a few around.


-1

zynga poker is full of cheats and bots, all you have to do is look at players profiles, they will tell all. It is to the point where I cant go to a table that doesnt have 40 percent of cheaters sitting there, look at their hands played versus hands won, how long they have been playing, and the level that is shown for the amount of hands played and won, it is almost impossible to find a table with just normal players, and zynga knows this, I report probably 20 to 30 cheats a day, and yet will still see them again the very next day.


2

You alone cannot determine if a poker server is cheating. Making that determination for all but the most ridiculously obvious biases requires statistical analysis of a sample size of millions, perhaps even billions of hands of poker.

So in the case of the Absolute Poker scandal, where a player could see his opponent's hole cards and was making no attempt to disguise this fact, the analysis used to prove he was cheating used a database of ~30,000 hands to statistically prove that the player was winning at an impossible rate, and that this was because he was playing perfectly against his opponent's specific hands.

If you wanted to prove that there was some bias in the random number generator of a poker site you would need to play multiple tables for many hours a day for many months in order to have any accuracy in your analysis.

So here's the best thing to do when you think an online poker server is cheating:

  1. Recognise your own confirmation bias.
  2. Understand the true nature of probability, statistics and randomness.
  3. Recognise that significant variance can occur in small sample sizes.
  4. Acknowledge the impossibility of proving your hypotheses.
  5. Accept you are in the lap of the random number generator and must deal with the results.

0

what do you mean by "cheats"? If you are good at Googling, you will easily find relations between zbot from annual computer poker championship and zynga poker on facebook. Using bots in learning poker game is a good type of practice. Since zynga is about organizing games using "play money", it is up to you whether make real money deposits or not.

Also, beating poker AI like zbot is not an issue for advanced players. It calculates GTO strategy so according to Nash Equilibrium, you should use GTO as well to win. But a human will never calculate something like GTO so a human will never win against GTO. But NLHE can not be calculated with existing computational power, so you can play against "not complete GTO" using an Exploitational Strategy.

All the academic poker AIs compete in calculating GTO. But REAL poker AIs that earn money on rooms use Exploitational Strategies against each opponent. There is weak information in Google about such strategies because it really makes money for the users.