Bitcoin Forum
May 14, 2024, 03:58:12 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 [8] 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 »
141  Economy / Marketplace / Re: Introducing Cardwars on: May 23, 2011, 07:14:38 PM
I want to thank BTEmporium for opening up his test server to me.

Based on what I have currently found, I think there may be a flaw in the shuffling algorithm used by php to shuffle arrays.  I need to investigate further and use a larger sample size, but there's a good chance that there is a flaw in it where certain cards are more likely to be in certain positions.

I'll run some tests tonight and report back.  I believe that BTEmporium is trying to run a fair game and is letting me help find any potential problems.

The payout problem with the current rules left a gigantic player advantage (6.8%), which means losing a lot of money over and over is very unlikely with a fair deck.  If there was anything that was not fair, it likely was not due to anything intentional by BTE, but by a flaw in php.  I'll update this thread with any findings I have.
142  Economy / Marketplace / Re: Thinking about creating an escrow service... on: May 23, 2011, 04:47:36 PM
This would be put on my list of "websites to create", probably won't get to it for a few weeks as I already have two other sites in progress.

Anyway, I'm thinking about setting up an escrow service website.  Biggest problem I have right now is the resolution of conflict.  If I take the paypal route, anyone with a tracking # showing proof of shipment would be awarded the bitcoins.  However, I know sellers are known to rip people off by sending bricks, notebooks, etc to buyers in place of the actual items.

Is there any way that anyone can see to prevent this?  Obviously, taking pictures doesn't help, as the buyer could have just as easily filled the box with his own bricks.  I thought about unboxing videos, but the buyer could have also used his own bricks, then resealed the box.  Aside from videoing nonstop from the point of the mailman delivering the package, I can't think of any way for the buyer or seller to really verify with 100% proof that they did indeed uphold their end of the deal.

Another option is to "hook in" to my feedback website, to where any complaints against a buyer or seller result in a negative feedback against that person.  However, I know that many people may want to use an escrow service anonymously, so I'd want to be sure to be able to service their requests as well.

I could always go the clearcoin route of having coins donated to a charity if the seller doesn't produce the goods.  But that still poses a significant risk to the seller.  I would like to alleviate the risk to both parties.

Also, this is not "just another escrow service".  I have a twist on it that will definitely help buyers and sellers.  I'm excited to reveal the completed site down the road.  Smiley

What would the community like to see out of an escrow service?

That's the trouble.  There's always a way to scam.  Reputation has to be a big part of it.  Either that or actually having them ship the boxes to you first.
143  Economy / Marketplace / Re: Open Source Bitcoin Casino on: May 23, 2011, 04:20:36 PM
I understand that open source projects involve security risks. I think these risks can be effectively managed. If anyone has productive input on open source security, please help me out instead of playa hatin. We need great security people for this project.

Bitcoin gambling is gonna happen. Is it gonna be dominated by facebook types or the open source community? We gotta do this right from the start. I'm just trying to start the discussion and organizational process.... I've also got alot of ideas on the software and stuff, so I'm mostly just trying to code that out....

And there's money involved so I'm trying to get in on the ground floor. duh. But I'm not trying to be bill gates. I just wanna job in an organization with respectable ethics...

Peace yall... Lets keep talking...

It's going to be dominated by whoever does it best and whoever markets it best.  Open source may be part of the marketing (since Bitcoin is mostly a niche community now).
144  Economy / Marketplace / Re: Introducing Cardwars on: May 23, 2011, 03:51:27 PM
Players will always try to cheat, it's the role of the house to ensure they fail on the attempt.
With poker and low stakes, to not drag in those "cheating sharks", I believe I can put up a pleasant online poker. Players colluding is however a harder issue to deal (specially if they don't use the same IP Address), but that's something for other players in the table to see.

An issue to not need that mils budget is to not run mils tables. If stakes are too low to be "cheating profitable" they should keep their hands off (I believe).

Cheaters gonna cheat.  I've played counter-strike for free and people cheat.  As long as you are monitoring things to make sure you aren't paying too much, players will have an interest in making sure they identify anything fishy, that should help out.

With a table game, no one is interested in protecting the house except the house and good Samaritans.  Players must also trust that they are getting a fair game, and with no 3rd party audits or checks, it's a matter of faith that the programmer did everything correctly and is not devious.

If there is anything else you need from me to help, I am willing to give it a look.
145  Economy / Marketplace / Re: Introducing Cardwars on: May 23, 2011, 02:40:50 PM
There wouldn't still be enough, playing 1 mil hands, by the theory of large numbers it would resemble a game tendency, however it would take a while until 1 million hands get played and that tendency shows of, meanwhile SD will call the shots and it may be to the house... or not.
Therefore on this kind of table games, I'll work towards online poker where the house takes its rake and players deal with each others. Not much to bother there, just keep an eye if the things go fine and if all-ins are well distributed.

For the 1 million hands, you certainly could get a good idea that the game appears to be fair.  It shouldn't take that long to simulate (maybe a few hours at most).  If you are putting your money on the line in the house, it seems worth it.

Even then there are a lot of considerations.  You want to run a fair game.  There have been exploits in the past where you could predict what cards were coming due to an improper RNG.  Players can cheat and collude with each other.  There are potentially a lot of troubles.  There's a reason why the major poker sites all have multi-million dollar software budgets.

Best of luck!
146  Economy / Marketplace / Re: Introducing Cardwars on: May 23, 2011, 01:55:24 PM
Even if I'm a "pioneer" and still have some dusty-BTC, I don't have a limitless supply of it.
Being alone also makes things hard, as I've to sleep from time to time leaving the casino on its own.

So far it adds to experience, so I can redo things better, log more... The logging system at testnet creates text files, so it's easy to follow, in that server it goes to db and due to a query error it was logging over the same line (means instead of sequential log I found out pretty few data about the last hand played).

Even the big time casinos can be hit by this kind of stuff.  I've seen major sites have flaws in their shuffling algorithm that was exploitable and got hit for a ton of money.  But at the very least, calculate the expected odds on a game, then set up an automated test to play a million hands or so, and make sure you are very close to the expected value.  Doing that in this case should have caught the problem.

These types of games also can be very easily rigged to favor the house as well (not saying you did this, but others might).  So buyer beware on these types of things.  It's not very hard to rig a deck so that the player wins less than he should, but still wins close enough to the right amount that he doesn't notice.
147  Economy / Marketplace / Re: Introducing Cardwars on: May 23, 2011, 01:02:12 PM
Gosh! Not my coding weekend as it seams.... woke up and found heavy losses at mbtcasino (luckily it was at mbtc), had to rush to put some coins from my wallet to cover it.  Sad

I'll retract table card games, it attracts a kind of gambler I'm not quite comfortable with. While slots and lottery attracts relaxed players, table games attracts gamblers filled up with "get rich schemes" and all sorts of statistical rigs along. I would need a 24h/day surveillance system to see what's going on.

tom, late I'll put the cardwars test-net online.

If you make a flaw in your payouts, someone will find it and exploit it.  The bug we found potentially saved you a ton of cash.  Even with the slots, if there's a mistake in the code, you can get burned hard.  However, it's more difficult for a user to find a slot that is paying out better than 100% (plus it's also easy to rig it toward the house).

Having a casino opens you up to a lot of losses even if it's done properly.  Hopefully you have it covered in case someone does get lucky.
148  Economy / Marketplace / Re: Introducing Cardwars on: May 23, 2011, 03:12:18 AM
I'm not sure whether to feel good or bad that we helped fixed the glitches.  I think that next time somebody posts a game with a double payment glitch, I'm going to keep my mouth shut and just play it until they realize the mistake themselves...  Making a few hundred bucks off a casino is something I think I can learn to not feel bad about.  Wink

I'm still not convinced that it was working properly for real money.  The edge we had was quite significant, getting down 30 bets is just so hard to pull off with that edge.  

Debugging source code without being to step through it or examine what its actually doing is tough, especially when you don't have all the code.

I'm hoping he has logs of what happened for real money.  I see code that looks like it's logging things, so I'd love to look at those.  There's always a chance the log is wrong, but it should shed some light on it.

I caught a huge bug in an online poker site.  They had a bug where a player could go all in for less than other players.  But if he won, he'd win the same amount everyone else bet.  For example, someone bets $3 (all he has).  The other players raise and stay in for $10 each.  So the total pot is $23.  If the hand plays properly, the low guy wins $9 if he actually wins, and the winner of the other two gets the other $14.  But they would give the low guy $30 out of a $23 pot.  I saw one case where the house actually lose >$1000 on one hand.  It was a crazy bug.  There wasn't a great way to take advantage of it since it didn't always happen.  Might as well report it for good karma.
149  Economy / Marketplace / Re: Introducing Cardwars on: May 23, 2011, 01:13:11 AM
If it helps you to understand what's going "behind the scenes", here's a line of server to client log (from test server):

<?xml version="1.0" encoding="UTF-8"?>
<response response_id="2"> <component name="Balance" response="update">
<generalBalance name="Cardwars" amount="-1000" />
<generalRealBalance amount="10000" />
</component> <component err_code="0" game_session="25" name="Cardwars" response="deal">
<result player="As" dealer="Qs" state="win" />
<bet name="ante" staked="1000" won="2000" />
<bet name="tie" staked="1000" won="0" />
</component></response>

Tomorrow after fixing it, I'll give you the address to test-net.
Still, the only difference between play and real is that button in the corner; at play it's blue and says play for real / in real it's green and says cashier.

The only difference is supposed to be that, of course, but there is some different code paths, so it's always possible for a bug.  I'd like to see the original code on test-net if possible just to pay close attention to the tie situations.  Thanks for looking into this, no rush on anything.
150  Economy / Marketplace / Re: Introducing Cardwars on: May 23, 2011, 12:54:29 AM
If I was getting undercharged on war bets and given the full payouts, I must be the most unlucky guy alive to lose that much!  I would have had a 3% edge, and was down 30 bets.  Maybe a .5% chance of it or worse, so it's always possible I am just unlucky!

Still trying to go through the code, some of it is a bit tricky to read.

If you want me to test using the actual game (I'd like to try in real money mode, but I would of course not keep any of the profit or losses since it would just be for testing), I'm open to it.
151  Economy / Marketplace / Re: Introducing Cardwars on: May 23, 2011, 12:32:13 AM
Well... just figured it was double paying on ties and was double 1/100.
This second bug actually covered up the double paying and added that 1% "commission".

initial bug is here:

         case 'war':
                   $warbet = $cardwars->bet/100;
                    $realbet = $warbet/100;

The switch that calls the functions.
Second bug is in that class.
bug 1 + bug 2 = 1% commission on war ties

This is code you didn't post already, right?

Is it doing something different for real vs. fake money?

I really appreciate you looking at this!
152  Economy / Marketplace / Re: Introducing Cardwars on: May 23, 2011, 12:11:49 AM
Ok, looks like the rule *should* be this:

If the player elects to go to war he must raise his bet by an amount equal to his original wager. The dealer will do the same but this is just for show. The dealer will then burn three cards and give the player and dealer another card each. If the player's second card equals or beats the dealer then the player shall win even money on the raise only and the original wager shall push. If the dealer's second card is greater the player shall lose both bets.

It definitely wasn't doing that for play money.  Could have been intentional or not.  I was getting double the payout.  I know I wasn't losing anything extra on the 2nd bet.  That could be where the "commission" was coming from, the 2nd bet was 1/100 of what it was.  I see a lot of bet/100 code, so perhaps that's what's happening on the 2nd bet.
153  Economy / Marketplace / Re: Introducing Cardwars on: May 23, 2011, 12:09:27 AM
This is real odd, playing for play money, and the opposite is happening, I can't stop losing.  I need to run a simulation to see what are the odds someone is behind by 10 bets within 1000 plays or something.  Perhaps I am just unlucky at real money and super lucky at real!

A 95% confidence at 1000 trials of a 50/50 game is plus or minus 32 units.  As I keep telling you, 10 unit swings are common.

10 units, then 20 (smaller) units after that?  Based on the bug I already found?  Sure, it's possible.  I wasn't at 1000 trials, no way.  If I played more than 200 hands I'd be surprised.

You have an easy way to calculate the probability?  I'll write a program real quick to test it out based on the actual probabilities of what the game should have been.
154  Economy / Marketplace / Re: Introducing Cardwars on: May 23, 2011, 12:07:21 AM
Just hit a war, won, and got paid what I would have expected ($40-commission) in play money.  Really weird.

If you have logs of the hands, that would be super sweet to look at.  I'd like to get to the bottom of this.  I trust you aren't trying to scam anyone, and either it's a misunderstanding of the rules or a bug somewhere.

I was paying attention to my balance and I'm fairly sure (although not 100%) that I got paid the full amount, eg 39.90

You were playing play money?  I was noticing full payout on play money.  I wasn't paying close enough attention at real money to know.  I think at play-money, he wasn't charging enough on ties when you lose (you have to double your bet).  If the opposite problem exists at real (I have to speculate since I can't test it anymore), everything makes perfect sense.  I don't understand a lot of the external parts of the code for what he posted (it didn't even seem to really have the option for users to surrender or not, so I don't see where that code is), so there's no way to verify it.

I'm pretty sure that's the problem.  Hopefully he can get that part of the code or investigate it (I'd be happy to test on a different account with house money that I couldn't cash out if I won) to try to identify the problem.

It's always possible I ran 10 standard deviations below normal over my few hundred hands, but based on the play money problem I think I found, a bug seems more likely.
155  Economy / Marketplace / Re: Introducing Cardwars on: May 22, 2011, 11:58:04 PM
As I watched on the database:

From the initial 100 FBTC:

tomcollins: +7%, had been down to -5% at least
luv2drnkbr: +160%

This all in fun play, same algorithm, "just eyes" didn't touch anything.

Yes, tom, this game wages well the player during the wars, but before the player get a war he may lost a lot.
Also, by the looks of the DB, and assuming luv2 would make the same entrance you did I must say I'd been *F* lucky... as your luck seams to be down either for real or play, while his doesn't.

Still I'll "sleep over it" to decide whether to put this on or not. It's almost 1 AM here and I want to run more statistical analysis on it along with find that annoying 1% "commission".

I was betting 10 FBTC though, so that represents only a 16 unit upswing.  Please please put the game back in as it was, I'll be your bestest friend forever and ever.   Cheesy

16 unit upswing is absolutely huge in this game.  It's almost like we are playing as the dealer for play money, and player for real money.  If the codepath is different for real vs. play, that might explain it.  Something is not right.  I think for play money, we are paying only half as much as we should on tie-loss, but with real money, it's the opposite (pay full amount for tie-loss, get half the payout for tie-win).  The numbers seem to match up perfectly.

Hopefully it's a bug and BCE finds it tomorrow.  I'd greatly appreciate knowing what happened.
156  Economy / Marketplace / Re: Introducing Cardwars on: May 22, 2011, 11:55:45 PM
As I watched on the database:

From the initial 100 FBTC:

tomcollins: +7%, had been down to -5% at least
luv2drnkbr: +160%

This all in fun play, same algorithm, "just eyes" didn't touch anything.

Yes, tom, this game wages well the player during the wars, but before the player get a war he may lost a lot.
Also, by the looks of the DB, and assuming luv2 would make the same entrance you did I must say I'd been *F* lucky... as your luck seams to be down either for real or play, while his doesn't.

Still I'll "sleep over it" to decide whether to put this on or not. It's almost 1 AM here and I want to run more statistical analysis on it along with find that annoying 1% "commission".

Ok, seeing something weird on play money.  I play on fast mode so it's harder to see what's going on.  I got a tie.  Was betting 10BTC.  I went to war, and my balance as only .10 less afterward. I would have expected it to drop by 10BTC again.

I'm up 200% on play money now, played a TON of hands, though.  It's possible I'm just unlucky, but something seems off.  The code you put up is missing a few pieces so I'm not quite sure how it works.

dcard is dealer card?  

Get some sleep, we'll get to the bottom of it tomorrow.  Thanks for looking into it.
157  Economy / Marketplace / Re: Introducing Cardwars on: May 22, 2011, 11:47:01 PM
Just hit a war, won, and got paid what I would have expected ($40-commission) in play money.  Really weird.

If you have logs of the hands, that would be super sweet to look at.  I'd like to get to the bottom of this.  I trust you aren't trying to scam anyone, and either it's a misunderstanding of the rules or a bug somewhere.
158  Economy / Marketplace / Re: Introducing Cardwars on: May 22, 2011, 11:44:45 PM
I was up a lot, lost a lot since then.

The problem may be that it doesn't pay enough when you win on wars.  That might account for it.  It's annoying because I need to get a war then win to see if it's right, plus I need to remember what my balance was before the bet.

If that's the case, then my losses is pretty much expectations, but that doesn't seem like that's what it's supposed to be paying me.

For example, I bet $10.  I get a tie, so I go to war, bet another $10.  I should get $39.90 back ($19.90 profit) if I win the war, and bet out my $20.10 if I lose the war.  But what may be happening is I win back only get back $29.90 (my $20 bet plus $10 on the war bet).

Actually, that is how Casino War works in the Casino now that I looked it up.  This is a brutal game for the player even with the tie going to the player (the commission fixes that).

Arg, I think that makes sense at least.  Not quite the rules I was expecting (it's not really well defined).  House edge is gigantic.
159  Economy / Marketplace / Re: Introducing Cardwars on: May 22, 2011, 11:30:37 PM
This is real odd, playing for play money, and the opposite is happening, I can't stop losing.  I need to run a simulation to see what are the odds someone is behind by 10 bets within 1000 plays or something.  Perhaps I am just unlucky at real money and super lucky at real!
160  Economy / Marketplace / Re: Introducing Cardwars on: May 22, 2011, 11:22:25 PM
Still can't find where is that 1% going:

Here's the "war" code:

Code:
<?php
      
function war(){
          global 
$bank,$Player;
           
$this->output[] = '<component err_code="0" game_session="'.$this->game_id.'" name="Cardwars" response="war">';          
           
$ucard $this->deck[$this->pointer];
           
$this->pointer++;
           
$dcard $this->deck[$this->pointer];
           
$this->pointer++;

           
$dcardVal $this->getCardValue($dcard);
           
$ucardVal $this->getCardValue($ucard); 

          if(
$dcardVal $ucardVal){
               
$bank->method "update";
               
$this->betLines[] = '<bet name="ante" staked="'.$this->bet.'" won="0" />';
               
$this->betLines[] = '<bet name="bet" staked="'.$this->bet.'" won="0" />';
               if(
$this->tie 0){
                      
$tieWon = ($this->tie 10) + $this->tie;
                    
$this->betLines[] = '<bet name="tie" staked="'.$this->tie.'" won="'.$tieWon.'" />';
                  
$bank->addBalanceLineX($tieWon);
                  
$bank->payPrize($tieWon/100);
                  if(
$bank->play == "r"){
                        
$Player->updateReal($tieWon/100);
                  }else{
                        
$Player->updateFree($tieWon/100);
                  }                    
                                
               }else{
                   
$bank->addBalanceLineX(-$this->bet);
                   
$this->betLines[] = '<bet name="tie" staked="0" won="0" />';
               }
               
$this->output[] = '<result player="'.$ucard.'" dealer="'.$dcard.'" state="loss" />';
          }else{
               
$bank->method "update";
               
$betWin $this->bet 2;
               
$this->betLines[] = '<bet name="ante" staked="'.$this->bet.'" won="'.$betWin.'" />';
               
$this->betLines[] = '<bet name="bet" staked="'.$this->bet.'" won="'.$betWin.'" />';
               
$bank->payPrize(($betWin 2)/100);
               if(
$bank->play == "r"){
                   
$Player->updateReal(($betWin 2)/100);
               }else{
                   
$Player->updateFree(($betWin 2)/100);
               }
               if(
$this->tie 0){          
                       
$tieWon = ($this->tie 10) + $this->tie;
                    
$this->betLines[] = '<bet name="tie" staked="'.$this->tie.'" won="'.$tieWon.'" />';
                  
$bank->addBalanceLineX($tieWon);
                  
$bank->payPrize($tieWon/100);
                  if(
$bank->play == "r"){
                        
$Player->updateReal($tieWon/100);
                  }else{
                        
$Player->updateFree($tieWon/100);
                  }  
               }else{
                   
$bank->addBalanceLineX($this->bet 2);
                   
$bank->addBalanceLineX($this->bet 2);
                   
$this->betLines[] = '<bet name="tie" staked="0" won="0" />';
               }
               
$this->output[] = '<result player="'.$ucard.'" dealer="'.$dcard.'" state="win" />';             
          }
    }
?>


What happened tomcollins?

In a fair game, I win my bet 47%, lose my bet 47%, win 199% of my bet 3.2%, lose 201% 2.8%.  I started playing for 1 BTC per hand.  Getting down 10 BTC in a short period of time is fairly hard to do.  I'll need to run the simulations on it.  So I switched to lower bets, same thing kept happening, I would lose far more often than you would expect.  I didn't record results, but getting down 10 bets with the first amount, then getting down about 10-15 bets again is very, very unlikely if it were a fair game.

I doubt you are scamming us, but something is not kosher with the way the cards are being dealt.  I'll see if I can figure out what it is, if that's the source.  I'll find the 99% thing too.
Pages: « 1 2 3 4 5 6 7 [8] 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!