Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trade Penalty #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Trade Penalty
Need depth... I saw a piececount in bitboard
  • Loading branch information
jjoshua2 authored Mar 15, 2019
commit 787c05702f83d775aa1cc146a77e938cfcf38c28
7 changes: 6 additions & 1 deletion lib/nn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,12 @@ void Computation::clear()
float Computation::qVal(int index) const
{
Q_ASSERT(index < m_positions);
return m_computation->GetQVal(index);
auto q = m_computation->GetQVal(index);
auto trade_penalty = .003;
auto penalty = trade_penalty * (bitboard>piececount - 30);
if(depth % 2 == 1)
penalty = -penalty;
return q + penalty;
}

void Computation::setPVals(int index, Node *node) const
Expand Down