Merge branch 'master' of github.com:ornicar/lila into puzzle

* 'master' of github.com:ornicar/lila:
  Update scrimage-core to 4.0.11
  server side analysis now using sf 12 nnue
pull/7680/head
Thibault Duplessis 2020-11-29 10:32:24 +01:00
commit eac4de3f34
5 changed files with 24 additions and 16 deletions

View File

@ -43,10 +43,10 @@ object features {
a(href := routes.Page.variantHome())("8 chess variants (Crazyhouse, Chess960, Horde, ...)")
),
tr(custom("30 per day"))(
s"Deep $engineName server analysis"
"Deep Stockfish 12+ server analysis"
),
tr(unlimited)(
s"Instant local $engineName analysis"
"Instant local Stockfish 11+ analysis"
),
tr(unlimited)(
a(href := "https://lichess.org/blog/WN-gLzAAAKlI89Xn/thousands-of-stockfish-analysers")(
@ -125,7 +125,7 @@ object features {
a(href := routes.Tournament.home())("Arena tournaments")
),
tr(check)(
s"Board editor and analysis board with $engineName"
"Board editor and analysis board with Stockfish 11+"
),
tr(unlimited)(
a(href := routes.Puzzle.home())("Tactics puzzles")
@ -196,6 +196,4 @@ object features {
private def tr(value: Frag)(text: Frag*) = st.tr(th(text), all(value))
private val title = "Lichess features"
private val engineName = "Stockfish 11+"
}

View File

@ -436,7 +436,7 @@ fishnet {
}
offline_mode = true # any client can provide moves and analysis
actor.name = fishnet
analysis.nodes = 4000000
analysis.nodes = 2250000 # nnue
move.plies = 300
client_min_version = "1.15.10"
}

View File

@ -47,8 +47,12 @@ object JsonApi {
case class FullEngine(
name: String,
options: EngineOptions
) extends Engine
options: EngineOptions,
flavor: Option[String]
) extends Engine {
// TODO: Monitor only nodes/nps from NNUE analysis
def isNnue = flavor.has("nnue")
}
case class EngineOptions(
threads: Option[String],
@ -90,7 +94,9 @@ object JsonApi {
.flatMap(_.nodes)
}
def strong = medianNodes.fold(true)(_ > Evaluation.acceptableNodes)
// fishnet 2.x analysis is never weak in this sense. It is either exactly
// the same as analysis provided by any other instance, or failed.
def strong = stockfish.flavor.isDefined || medianNodes.fold(true)(_ > Evaluation.legacyAcceptableNodes)
def weak = !strong
}
@ -128,10 +134,10 @@ object JsonApi {
def invertIf(cond: Boolean) = if (cond) invert else this
}
val npsCeil = 10 * 1000 * 1000
val npsCeil = 10_000_000
val desiredNodes = 3 * 1000 * 1000
val acceptableNodes = desiredNodes * 0.9
private val legacyDesiredNodes = 3_000_000
val legacyAcceptableNodes = legacyDesiredNodes * 0.9
}
}
@ -216,9 +222,13 @@ object JsonApi {
Json.obj(
"work" -> Json.obj(
"type" -> "analysis",
"id" -> a.id
"id" -> a.id,
"nodes" -> Json.obj(
"nnue" -> a.nodes,
"classical" -> a.nodes * 18 / 10
)
),
"nodes" -> a.nodes,
"nodes" -> a.nodes * 18 / 10, // bc for fishnet 1.x clients without nnue
"skipPositions" -> a.skipPositions
)
}) ++ Json.toJson(work.game).as[JsObject]

View File

@ -12,7 +12,7 @@ object Dependencies {
val compression = "org.lichess" %% "compression" % "1.6"
val maxmind = "com.sanoma.cda" %% "maxmind-geoip2-scala" % "1.3.1-THIB"
val prismic = "io.prismic" %% "scala-kit" % "1.2.19-THIB213"
val scrimage = "com.sksamuel.scrimage" % "scrimage-core" % "4.0.10"
val scrimage = "com.sksamuel.scrimage" % "scrimage-core" % "4.0.11"
val scaffeine = "com.github.blemale" %% "scaffeine" % "4.0.2" % "compile"
val googleOAuth = "com.google.auth" % "google-auth-library-oauth2-http" % "0.22.0"
val scalaUri = "io.lemonlabs" %% "scala-uri" % "2.3.1"

View File

@ -75,7 +75,7 @@ export default function(element: HTMLElement, ctrl: AnalyseCtrl) {
}
function chartLoader() {
return `<div id="acpl-chart-loader"><span>Stockfish 11+<br>server analysis</span>${lichess.spinnerHtml}</div>`;
return `<div id="acpl-chart-loader"><span>Stockfish 12+<br>server analysis</span>${lichess.spinnerHtml}</div>`;
}
function startAdvantageChart() {
if (lichess.advantageChart || lichess.AnalyseNVUI) return;