// File: /workspace/github_cpp_makefile_star2_O1/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 0x12218
leaq 0x3d705(%rip), %rax     # 0x4c850
movq %rax, (%rbx)
vxorps %xmm0, %xmm0, %xmm0
vmovups %ymm0, 0x4140(%rbx)
movw $0x0, 0x4160(%rbx)
leaq 0x29f9c(%rip), %rax     # 0x39106
movb (%rax), %al
movb %al, 0x4162(%rbx)
movl $0xfc78fd00, 0x4163(%rbx) # imm = 0xFC78FD00
movb $0x78, 0x4167(%rbx)
movq $0x0, 0x4168(%rbx)
leaq 0x4190(%rbx), %r14
movq %r14, %rdi
vzeroupper
callq 0x122bc
leaq 0x5550(%rbx), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1234e
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)
movq %r12, %rdi
movl $0x1, %esi
callq 0x123da
movq $0x3e800000, 0xb8(%rbx) # imm = 0x3E800000
vmovss 0x2501a(%rip), %xmm0    # 0x3421c
vmovlps %xmm0, 0xc4(%rbx)
xorl %eax, %eax
movb %al, 0xcc(%rbx)
vmovsd 0x25096(%rip), %xmm0    # 0x342b0
vmovsd %xmm0, 0xd0(%rbx)
movl $0x43480000, 0xd8(%rbx) # imm = 0x43480000
movb $0x1, 0xdc(%rbx)
vbroadcastss 0x24fe4(%rip), %xmm0 # 0x34220
vmovlps %xmm0, 0xe0(%rbx)
movabsq $0x13f800000, %rcx      # imm = 0x13F800000
movq %rcx, 0xe8(%rbx)
movq %rax, 0xf0(%rbx)
movw $0x100, 0xf8(%rbx)      # imm = 0x100
movl $0x2, 0xfc(%rbx)
movb %al, 0x100(%rbx)
movabsq $0x186a000000001, %rcx  # imm = 0x186A000000001
movq %rcx, 0x104(%rbx)
movb %al, 0x10c(%rbx)
vmovaps 0x2502c(%rip), %xmm0    # 0x342c0
vmovups %xmm0, 0x110(%rbx)
vmovaps 0x2502c(%rip), %xmm0    # 0x342d0
vmovups %xmm0, 0x120(%rbx)
movl $0x0, 0x130(%rbx)
movb %al, 0x134(%rbx)
movq %rax, 0x138(%rbx)
vbroadcastss 0x24f53(%rip), %zmm0 # 0x34220
vmovups %zmm0, 0x140(%rbx,%rax,4)
addq $0x10, %rax
cmpq $0x1000, %rax           # imm = 0x1000
jne 0xf2cd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
vzeroupper
retq
movq %rax, %r15
movq %r12, %rdi
callq 0x12572
jmp 0xf300
movq %rax, %r15
movq %r14, %rdi
callq 0x125b4
jmp 0xf30d
movq %rax, %r15
leaq 0x4140(%rbx), %rdi
callq 0x125fe
movq %rbx, %rdi
callq 0x1387c
movq %r15, %rdi
callq 0x5670
nop