pluribus
pluribus copied to clipboard
make the code compile
Hi,
I've downloaded your python port and I can't get it to compile - is it possible or it is not finished and the work must be done?
Thanks!
getActionsFromInfoSet
function is missing because it was not implemented in the original code. I asked @EAT-CODE-KITE-REPEAT but haven't heard back from him since. Also the deuces library has a different API so that needs to be fixed. So yes, work is very much needed in these areas. If anyone gets a working PR please let me know.
I'm not asking for missing functionalities - I was wondering if this was by any chance compilable. I mean I've tried to compile it with Python 2.7, 3.6 and 3.8. Each time I had trillion syntax errors in the whole file. That's why I was wondering if this is something on my part or is this code simply not compilable yet?
It works on nodejs in my repo @whatsdis getActionsFromInfoSet should do the exact thing as it's called. From the infoSet it should get a set of possible actions at that moment so it can iterate over those in the beginning of the script. Depending on how infoSet is implemented this is possible OR NOT, I think currently there is a problem and can't be implented yet because of the implementation of an infoSet. But I honestly think that this part of the code isn't even necessary:
function MCCFR_P(minutes = 1) {
for (let p = 0; p < PLAYERS.length; p++) {
Object.keys(treeMap).map(key => {
const I = treeMap[key];
if (getCurrentPlayerFromInfoSet(I.infoSet) === p) {
const actions = getActionsFromInfoSet(I);
let regretSum = [];
let strategy = [];
for (let a = 0; a < actions.length; a++) {
regretSum[a] = 0;
if (isPreflop(I)) {
strategy[a] = 0; // 𝜙(Ii,a) = 0; not sure if this is correct
}
}
treeMap[I.infoSet] = { ...I, regretSum, strategy };
}
});
}
so that would make getActionsFromInfoSet uneccesary also
@EAT-CODE-KITE-REPEAT thanks for the response. I will implement that in #3
@MarekKosinski No it does not yet compile due to issues #3 and #4 I've described previously.
Do you have any syntax errors? (other than deuces library and getActionsFromInfoSet function)
@MarekKosinski there are tons of syntax errors. The code uses //
comments, for example. Rather look at the original stuff by @EAT-CODE-KITE-REPEAT or look at the poker_ai project.
Please take a look from my commit: https://github.com/Mudr0x/pluribus/commit/c61606a076db12f6364ccee271d64dd9e760513e
I have corrected all code errors for Python 3.x (tested on Python 3.7) and now code is fully working.
However I don't really understand why you decide to translate Pluribus to Python the fact that NodeJS is very faster than Python (mostly for huge calculation) and I really certify this comparing NodeJS and Python code version speeds... Maybe for the fact that NodeJS cannot working with multiple cores with a shared memory and Python can (especially with its multiprocessing.shared_memory library), can you confirm me this?... But maybe NodeJS limitation for shared memory can be overcome with some solutions I mentionned here: https://github.com/Karsens/pluribus-poker-bot-js/issues/2
What do you think folks?