server side analysis now using sf 12 nnue

fishnet-nnue
Niklas Fiekas 2020-11-28 00:28:36 +01:00
parent 4ddb0ada47
commit a891a305a3
4 changed files with 23 additions and 15 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

@ -441,7 +441,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

@ -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;