Skip to forum
Stackoffski vs Stac...
 
Notifications
Clear all

Stackoffski vs Stackoffski

232 Posts
12 Users
84 Reactions
16.2 K Views
Super Moderator
VorpalF2F
Joined: 02.09.2010

Originally posted by Stackoffski
@ Vorpal:

This is javascript and comes from a Nodejs project, you can create a new nodejs project in your Visual Studio and put in these files. app.js is the main file to run.

Thanks!
I've forked it, and will clone it to my desktop to play with it.
I know zilch about JavaScript, but this will be a good opportunity to learn it.


Reply
Quote
Stackoffski
Joined: 08.09.2021

Originally posted by VorpalF2F
Thanks!
I've forked it, and will clone it to my desktop to play with it.
I know zilch about JavaScript, but this will be a good opportunity to learn it.

Beware! If you are coming from c++ (I don't know python) it might be cumbersome.:f_ugly: All the terms mean a little bit of a different thing than in c++.

I always use the Javascript Reference from mozilla.org

The cards are represented by numbers actually. A combination of a prime-number for the rank and a prime-number for the suit. The first (right) byte contains the prime number for the rank and the second byte contains the prime number for the suit.

           SSS   RRRRRR
    0b00000111_00111111

R contains the prime for the rank
S contains the prime for the suit
0's are unused bits.

Ace of spades would be Card(41,2). I put in a function for you makeCard() to make cards with strings like "As".


Reply
Quote
Rhodriguez
Joined: 01.10.2006

Originally posted by Stackoffski
Beware! If you are coming from c++ (I don't know python) it might be cumbersome.:f_ugly: All the terms mean a little bit of a different thing than in c++.

	generateCombos = function (cards[], size) {		
		combos = [];
		incomplete = [];
		for (card of cards) {
			for (combo of incomplete.copy()) {
				newCombo = combo.copy();
				newCombo.add(card);
				if (newCombo.size == size) {
					combos.add(newCombo);
				} else if (newCombo.size < size) {
					incomplete.add(newCombo);
				}
			}
			incomplete.add(new combo(card));
		}
		return combos;		
	}

Then it's good I didn't comment anything. Because I would have said that combo.copy(), combos.add() and incomplete.add() are the things that slow down the code. .add() always needs to resize the array. And .copy() always needs to copy the whole array. Maybe it's even worse as I don't know if .add() is a copy as well and not only a reference.


Reply
Quote
Stackoffski
Joined: 08.09.2021

o yeah that's just pseudo code. you do need to copy the combo, but the loop would be better to write for (let i=0, len=incomplete.length; i<len; i++) to avoid copying the thing although it doesn't even make a difference in javascript. But I used copy() there intentionally to be clear because if you don't cache the length you're in an inifinite loop.

Add() would not copy in js. Objects are always referenced, primitives are copied (cannot be referenced).

--

I probably need a hash-function for getting the data, right? I am working on it ... maybe it will be faster to calculate the hash index and jump to it than to search for the a number without calculcating it's index (what it does now)


Reply
Quote
Stackoffski
Joined: 08.09.2021

You'd think [ 2♣:3♣:4♣:5♣:7♦: ] was the worst hand you can make, but it is actually not possible to make it ... not with 5 cards on the board .. idiot me was missing things in the data, but it isn't supposed to be in it obviously ...


Reply
Quote
taavi1337
Joined: 29.05.2009

I like that code. Doesn't have to be poker-related, but more like overall life philosophy πŸ––


Reply
Quote
Stackoffski
Joined: 08.09.2021

Originally posted by taavi1337
I like that code. Doesn't have to be poker-related, but more like overall life philosophy πŸ––

Yes a bit of a sidetrack ... but I can just say the code is still poker-related :f_pleased:


Reply
Quote
Stackoffski
Joined: 08.09.2021

MTTs this month are not going fantastic ... can't seem to win a thing. Although a lot I have to say where quick speedracers so I can expect that to be swingy. But the swing only swong down this month until now..

Spoiler

Still a little bit up for the year:

Trying out some PLO .. Maybe as a sidequest I'll make a results-tracker for holdem and omaha ... with a browser-interface ... I don't have an omaha-tracker.
PLO might suit me! I liked playing it again and I can see how 4 cards in the hand of a good player creates more of an edge-gap than having 2 cards... It takes some time to get a feel for the backdoor-equities which seems like a bigger part of that game than holdem ... that's something you get from experience mainly, so PLO at low stakes with all the inexperienced players might be more profitable.


Reply
Quote
Stackoffski
Joined: 08.09.2021

I finally broke the downward trend yesterday:

MTTs this year so far:

Spoiler

(In buyins):

Not playing as much atm ... Well, good luck to yous!


Reply
Quote
Stackoffski
Joined: 08.09.2021

March Graph

Still not playing as much, ... doing other things. Will also go to an animal shelter shortly to volunteer as well (just a little bit).

March mtts (buyins):

Spoiler

I think I had more unluck then average these last 2 months, so I'm happy with the results.

This year:

Spoiler

Good Luck, play like you mean it!


Reply
Quote
Stackoffski
Joined: 08.09.2021

I could already smell the victory ... and then I could not ...

A9 < KT after I called a big shove preflop. Second king on the turn, drawing dead.


Reply
Quote
Stackoffski
Joined: 08.09.2021

April graph:

So far this year:

Spoiler

Last 2.5 years:

Spoiler

Proud of total graph showing steadyness at GG Hypers. (these are almost all hypers) :f_biggrin::f_thumbsup:

Averaging about 2.5-3 games/buyins each day with about 800/2522*100= 31.7% 'buyin-ROI%'.


Reply
Quote
Stackoffski
Joined: 08.09.2021

Another final table yesterday, let's see what tonight brings us. I have good feelings about us playing good and it's sunday mtt-day. let's go!

I wonder how much I am bluffing in mtts versus let's say the average player. Is it more? a lot? less? I'm certainly bluffing more often than in cashgames. I feel you can get away with more in mtts because everybody is looser. At least in hypers.


Reply
Quote
Stackoffski
Joined: 08.09.2021

Final table in a larger tournament, but I was the first one out:

The steadiness of my graph in buyins (of hypers and ultra-hypers) really make me wonder whether variance and the length of the long term in mtts is a bit overrated! We should really look at graphs in buyins and not actual winnings to say something aout mtt-variance. A lot of the suggested variance might be due to playing higher. My real money graph doesn't look like my buyins-graph either, but the buyins-graph just shows a steady 30% slope. And I only have 2.5K mtts, yet there is an obvious 'average-line' already.


Reply
Quote
Stackoffski
Joined: 08.09.2021

A 2nd place and a good day:

a lot of luck involved.


Reply
Quote
Stackoffski
Joined: 08.09.2021

May results

May:

Spoiler

Year:

Spoiler

Am also playing a little bit of cash again after a long time, down 2.5 buyins EV for now...


Reply
Quote
Stackoffski
Joined: 08.09.2021


...lost the hu...


Reply
Quote
Super Moderator
VorpalF2F
Joined: 02.09.2010

Originally posted by Stackoffski

...lost the hu...

Not too shabby though. Well done!


Reply
Quote
Stackoffski
Joined: 08.09.2021

Originally posted by VorpalF2F

Originally posted by Stackoffski

...lost the hu...

Not too shabby though. Well done!

Thanks!
Btw funny how my best hand was 96o :f_tongue:


Reply
Quote
Super Moderator
VorpalF2F
Joined: 02.09.2010

Originally posted by Stackoffski
Thanks!
Btw funny how my best hand was 96o :f_tongue:
In the early days of poker (for me) I won far too often with J8o
I started to open with it, and lost a bunch before I realize I was being stupid


Reply
Quote