• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

AdamStelmaszczyk / gtsa / 481 / 1
88%
master: 88%

Build:
DEFAULT BRANCH: master
Ran 06 Oct 2021 07:13PM UTC
Files 10
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Oct 2021 07:13PM UTC coverage: 89.424%. Remained the same
481.1

push

travis-ci-com

Adam Stelmaszczyk
Fix the UCT maximization

This fixes a severe bug that was making MCTS + UCT much weaker.

Root player move was corractly taken as:

max(ratio + UCT)

However, for the opponent wrong move was taken:

min(ratio - UCT)

I thought it was doing:

min(- ratio - UCT)

which would be correct.

I also simplified by always taking the max ratio (ratio = score / visits). Negamax trick.
Score is always stored with the respect to the player_to_move.

So e.g. root player has ratio = 0.7. However on opponent turn
we also want to take max, so want to have ratio 0.3 (for the same state).
To do this I pass "player" argument to the get_uct function,
to get UCT with respect to that player.

It passes all the unit tests, it also wins with Minimax(0.1)
when given 10s (does ~70-90k simulations). When given 1s (~7k simulations)
it loses. In 0.1s Minimax looks at ~80k positions, so MCTS is much slower.
There is probably a lot of optimization space in MCTS, e.g. unordered_set.

761 of 851 relevant lines covered (89.42%)

268268.76 hits per line

Source Files on job 481.1
  • Tree
  • List 0
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 467
  • Travis Job 481.1
  • 2889d92a on github
  • Prev Job for on master (#480.1)
  • Next Job for on master (#482.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc