// File: /workspace/github_cpp_makefile_star2_O3/tewalds[P]morat/havannah/agentmcts.cpp
// Function: Morat::Havannah::AgentMCTS::AgentMCTS(Morat::Havannah::Board const&)
AgentMCTS::AgentMCTS(const Board & b) : Agent(b), pool(this) {
	nodes = 0;
	runs = 0;
	gclimit = 5;

	profile     = false;
	ponder      = false;
//#ifdef SINGLE_THREAD ... make sure only 1 thread
	numthreads  = 1;
	pool.set_num_threads(numthreads);
	maxmem      = 1000*1024*1024;

	msrave      = -2;
	msexplore   = 0;

	explore     = 0;
	parentexplore = false;
	ravefactor  = 500;
	decrrave    = 200;
	knowledge   = true;
	userave     = 1;
	useexplore  = 1;
	fpurgency   = 1;
	rollouts    = 1;
	dynwiden    = 0;
	logdynwiden = (dynwiden ? std::log(dynwiden) : 0);

	shortrave   = false;
	keeptree    = true;
	minimax     = 2;
	detectdraw  = false;
	visitexpand = 1;
	gcsolved    = 100000;
	longestloss = false;

	localreply  = 0;
	locality    = 0;
	connect     = 20;
	size        = 0;
	bridge      = 25;
	dists       = 0;

	weightedrandom = false;
	checkringdepth = 1000;
	ringperm       = 0;
	rolloutpattern = false;
	lastgoodreply  = false;
	instantwin     = 0;

	for(int i = 0; i < 4096; i++)
		gammas[i] = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x121da
leaq 0x3c731(%rip), %rax     # 0x4b880
vxorps %xmm0, %xmm0, %xmm0
leaq 0x4190(%rbx), %r14
movq %rax, (%rbx)
leaq 0x29fa2(%rip), %rax     # 0x39106
vmovups %ymm0, 0x4140(%rbx)
movw $0x0, 0x4160(%rbx)
movb (%rax), %al
movb %al, 0x4162(%rbx)
movl $0xfc78fd00, 0x4163(%rbx) # imm = 0xFC78FD00
movb $0x78, 0x4167(%rbx)
movq $0x0, 0x4168(%rbx)
movq %r14, %rdi
vzeroupper
callq 0x1227e
leaq 0x5550(%rbx), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x12310
xorl %eax, %eax
movq %rax, 0x4170(%rbx)
movq %rax, 0x4180(%rbx)
movl $0x5, 0x4178(%rbx)
movb %al, 0xc0(%rbx)
movb %al, 0xb0(%rbx)
movl $0x1, 0xb4(%rbx)
movl $0x1, %esi
movq %r12, %rdi
callq 0x1239c
vmovss 0x25021(%rip), %xmm0    # 0x3421c
vbroadcastss 0x2501c(%rip), %xmm1 # 0x34220
vmovsd 0x250a4(%rip), %xmm2    # 0x342b0
movq $0x3e800000, 0xb8(%rbx) # imm = 0x3E800000
xorl %eax, %eax
movabsq $0x13f800000, %rcx      # imm = 0x13F800000
vmovlps %xmm0, 0xc4(%rbx)
vbroadcastss 0x24feb(%rip), %zmm0 # 0x34220
movb %al, 0xcc(%rbx)
vmovsd %xmm2, 0xd0(%rbx)
movl $0x43480000, 0xd8(%rbx) # imm = 0x43480000
movb $0x1, 0xdc(%rbx)
vmovaps 0x25064(%rip), %xmm2    # 0x342c0
vmovlps %xmm1, 0xe0(%rbx)
vmovaps 0x25064(%rip), %xmm1    # 0x342d0
movq %rcx, 0xe8(%rbx)
movabsq $0x186a000000001, %rcx  # imm = 0x186A000000001
movq %rax, 0xf0(%rbx)
movw $0x100, 0xf8(%rbx)      # imm = 0x100
movl $0x2, 0xfc(%rbx)
movb %al, 0x100(%rbx)
movq %rcx, 0x104(%rbx)
movb %al, 0x10c(%rbx)
vmovups %xmm2, 0x110(%rbx)
vmovups %xmm1, 0x120(%rbx)
movl $0x0, 0x130(%rbx)
movb %al, 0x134(%rbx)
movq %rax, 0x138(%rbx)
vmovups %zmm0, 0x140(%rbx,%rax,4)
addq $0x10, %rax
cmpq $0x1000, %rax           # imm = 0x1000
jne 0xf2d1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
vzeroupper
retq
movq %r12, %rdi
movq %rax, %r15
callq 0x12534
jmp 0xf304
movq %rax, %r15
movq %r14, %rdi
callq 0x12576
jmp 0xf311
movq %rax, %r15
leaq 0x4140(%rbx), %rdi
callq 0x125c0
movq %rbx, %rdi
callq 0x137a8
movq %r15, %rdi
callq 0x5670
nop