- for a given time limit (
l
) approximates the number of information sets AT ROUND LEVEL using axiomhq's HLL. - it outputs the estimated number of infosets + total terminal nodes visited
- e.g.:
go run cmd/count-infosets-ronda-hll-axiom/main.go -deck=7 -hash=sha160 -limit =120 -report=10
- a memory benchmark / stress / experiment comparing dynamic vs fixed slices and its memory consumption
- program takes parameter
-n
(int) which represent the targeted memory consumption / buffer size in MiB (e.g.,-n-500
~ 500 MiB buffer) - e.g.:
go run cmd/stress-mem/main.go -n 500
- for
-n=500
+ dynamic slice activity monitor shows a memory consumption of about1 GiB
but go's runtime shows aHeapAlloc
usage of520 MiB
(this is expected) - but then if we cap the mem pool size to 600MiB using env var
GOMEMLIMIT
as inGOMEMLIMIT=600000000 go run cmd/stress-mem/main.go -n 500
now activity monitor shows a memory consumption of about564 MiB
- deterministically count the number of infoset for a given deck size at round level.
- e.g.:
go run cmd/count-infosets-ronda-deterministically/main.go -deck=7 -hash=sha160 -info=InfosetRondaBase -abs=a1 -track=true -report=10
- deterministically count the number of infoset for a given deck size at game level.
- WARNING: this can take a LOT of time
- e.g.:
go run cmd/count-infosets-partida-deterministically/main.go
- hyperloglog python experimental implementation
- run as
python cmd/hll-py-example/hll1.py
- hyperloglog example in go using the axiom lib
- run as
go run cmd/hll-axiom-example/main.go
- for a given set of cards (i.e., a deck) it returns weather there's at least one flor (i.e., a combination of 3 cards + 1 muestra so that it's a flor)
- run as
go run cmd/check-hay-flor/main.go
- for a given deck size (harcoded) it returns the total possible number of edges comming out of the root chance node.
- it should obey the equation
$...$ - run as
go run cmd/count-root-edges-deterministically/main.go
- root server:
go run cmd/count-infosets-hll-http-dist/root/cmd/main.go -port=8080 | tee logs/hll-dist-http/http-w2-d14-anull-hsha3_6.log
- single worker
go run cmd/count-infosets-hll-http-dist/worker/*.go -hash=sha3 -deck=14 -abs=null -report=10 -limit=600 -root=http://localhost:8080
- single worker + exit:
curl -X GET http://localhost:8080/exit
- multiple workers:
for i in {1..16}; do go run cmd/count-infosets-hll-http-dist/worker/*.go -hash=sha3 -deck=14 -abs=null -report=10 -limit=600 -root=http://localhost:8080 &>/dev/null & done
adler32
, sha160
, sha256
, sha512
, sha3
a1
, b
, a2
, a3
, null
InfosetRondaBase
, InfosetRondaLarge
, InfosetRondaXLarge
, InfosetRondaXXLarge
, InfosetPartidaXXLarge
rsync -avz --copy-links --progress -e 'ssh -p 10022 -i ~/.ssh/id_rsa' --exclude '__pycache__/' --exclude '*.out' --exclude '*.log' --exclude '.git/' ~/Workspace/facu/hll-truco 'cluster.uy:Workspace/facu'
rsync -avz -e 'ssh -p 10022 -i ~/.ssh/id_rsa' 'cluster.uy:batches/out/hll-http/hllroot.3629053.out' logs/hll-dist-http/slurm
GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o bin/http/worker cmd/count-infosets-hll-dist-http/worker/main.go
GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o bin/http/root cmd/count-infosets-hll-dist-http/root/main.go
Make sure both the logs dirs --output
and --error
exist before execution!
mkdir -p ~/batches/out/hll-http/2p/E1P40AnullIipxxlW256 && sbatch -J hllroot1 --time=3-00:00:00 --begin=now+0 ~/Workspace/facu/hll-truco/hll-truco/sbatch/http/root.sbatch 10 16
the positional args are:
- Report (in secs)
- HLL precision
jobname=hllworkers1 && \
rootname=hllroot1 && \
rootid=$(squeue -u $(whoami) --name=${rootname} -h -o "%i") && \
roothost=$(squeue -u $(whoami) --name=${rootname} --states=R -h -o "%N:%k") && \
sbatch \
-J ${jobname} \
--time=3-00:00:00 \
--dependency=after:${rootid} \
~/Workspace/facu/hll-truco/hll-truco/sbatch/http/workers.sbatch \
2 1 40 null InfosetPartidaXXLarge sha3 252000 10 http://${roothost} 16
the positional args are:
- Number of players
<2,4,6>
- Envido limit (default 1)
- Game points limit
- Abstractor ID
<a1, b, a2, a3, null>
- Infoset impl. to use
- Infoset hashing function
- Run time limit (in seconds) (600 = 10min, 259.200 = 3 days)
- Delta (in seconds) for printing log msgs
- HTTP root server
- HLL precision