Skip to content

Commit

Permalink
Fix first_and_second_max() (#206)
Browse files Browse the repository at this point in the history
* Add VIRTUAL_VISIT as new virtual simulation style

* Sort folder names in train archive by time stamp (close #189)

* Add virtualVisitIncrement

also only increase virtualLoss Counter by 1

* Add UCI-Option "Virtual_Visit_Increment"

* Add VIRTUAL_OFFSET UCI-Option

* Add missing ;

* Simplify VIRTUAL_VISIT

* Update virtual-Offset implementation

+ use also virtual-visit of 1
+ don't use additional vector operation

* Add missing implementation for VIRTUAL_OFFSET in
get_transposition_q_value()

* Change Centi_Virtual_Loss to Milli_Virtual_loss

* Change Milli_Virtual_Loss to Micro_Virtual_Loss

* Update max value for Micro_Virtual_Loss

* Add VIRTUAL_MIX
Rename VIRTUAL_LOSS into VIRTUAL_WEIGHT
Replace virtualVisitIncrement by virtualMixThreshold

* Use realVisitSum as condition for Virtual_Mix

* Simplify code and use realVisits of child node for VIRTUAL_MIX threshold

* Fix compile bugs

* Use d->childNumber visits again

* Deactive virtualWeight for now

* Deactive virtualWeight

* Use Q_INIT for comparision

* revert last change

* Add virtualOffsetStrenght(0.001)
Switch between VIRTUAL_OFFSET and VIRTUAL_VISIT when using VIRTUAL_MIX

* revert

* Update VIRTUAL_OFFSET

* Switch between VIRTUAL_LOSS and VIRTUAL_VISIT

* Add virtualLossIncrement

* remove virtualLossIncrement again due to underperformance

* Update UCI-default values

* Fix compile error

* Disable 960 Support for now due to problems

* Fix init of second argument in first_and_second_max()

* Remove init of additional nodes in NodeData

* Remove Virtual_Weight for now

* Fix first_and_second_max()

Update secondMax = std::numeric_limits<T>::min();
  • Loading branch information
QueensGambit authored Aug 8, 2023
1 parent 90af28f commit 50c930e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engine/src/util/blazeutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include <cfloat>
#include <blaze/Math.h>
#include <limits>
#include<climits>
#include "randomgen.h"

Expand Down Expand Up @@ -148,7 +149,7 @@ template <typename T, typename U>
void first_and_second_max(const DynamicVector<T>& v, U endIdx, T& firstMax, T& secondMax, U& firstArg, U& secondArg)
{
firstMax = v[0];
secondMax = v[0];
secondMax = std::numeric_limits<T>::min();
firstArg = 0;
secondArg = 0;
for (size_t idx = 1; idx < endIdx; ++idx) {
Expand Down

0 comments on commit 50c930e

Please # to comment.