Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4235ec3b6 | ||
|
|
d7cccb46a2 | ||
|
|
36d4360585 | ||
|
|
419191ae4e | ||
|
|
2b5f05941a |
@@ -583,9 +583,6 @@ impl Motor {
|
||||
}
|
||||
|
||||
fn nl2(&self, q: &Value, a: Value) -> Value {
|
||||
if crate::sharingan::rein_roh() {
|
||||
return a; // MOTOR_REIN_ROH: keine Nachschicht in Arm B
|
||||
}
|
||||
if self.s.turnier || self.s.n == 2 || self.s.splash > 0 || self.s.art == crate::spiel::Art::PushFold || q.get("eigen").is_some() || q.get("probeHand").is_some() || q["nackt"] == true || q["vorrechnen"] == true || q["vorrechnen_strasse"] == true {
|
||||
// MOTOR_STACKOFF_SPLASH=1 (01.12.): an Splash-Tischen sonst keine NL2-Schicht, also auch keine Stack-off-Bepreisung
|
||||
// (99 auf J83-4: Turn-Raise 85 bb in einer Splash-Hand, nie bepreist). Nur die Bepreisung, nicht die uebrigen Regeln.
|
||||
|
||||
@@ -376,14 +376,6 @@ fn main() {
|
||||
r["reason"] = serde_json::json!(format!("Splash{} {}", y.0, r["reason"].as_str().unwrap_or("")));
|
||||
r
|
||||
}
|
||||
// MOTOR_SHARINGAN_SPLASH (03.12.): ohne passende eigene Splash-Tabelle spielt SHARINGAN (totes Geld als dead_money);
|
||||
// antwortet er nicht, wie bisher kein Zug (der Hauptbaum kennt kein totes Geld)
|
||||
_ if crate::sharingan::splash() => {
|
||||
let r = m.antworte(&q);
|
||||
if r["reason"].as_str().is_some_and(|g| g.starts_with("sharingan")) { r } else {
|
||||
serde_json::json!({"action": "ABSTAIN", "size": null, "confidence": 0, "reason": "motor notfall: keine Splash-Strategie, SHARINGAN ohne Antwort"})
|
||||
}
|
||||
}
|
||||
_ => serde_json::json!({"action": "ABSTAIN", "size": null, "confidence": 0, "reason": "motor notfall: keine Splash-Strategie"}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,16 +85,8 @@ pub fn splash() -> bool {
|
||||
}
|
||||
|
||||
/// Zuggrund vor dem Flop, wenn totes Geld oder ein Nachpost im Topf liegt (seine Tabellen kennen beides nicht)
|
||||
const GRUND_SPLASH: &str = " [Splash: Tabelle ohne Splash-Knoten; Topf mit totem Geld]";
|
||||
const GRUND_NACHPOST: &str = " [Nachpost: Tabelle ohne Nachpost-Knoten; Nachpost als Einsatz im Topf]";
|
||||
|
||||
/// MOTOR_REIN_ROH=1 (03.12., Owner "weg mit den heuristiken"; nur mit MOTOR_SHARINGAN_REIN, Standard aus): keine Antwort dieses Prozesses
|
||||
/// geht durch unsere NL2-Nachschicht (Abgleich, Stack-off, Bluffpreis) - auch nicht der Rueckfall auf unseren Motor und nicht Straddle.
|
||||
/// Reihenfolge bleibt: seine Suche, dann seine Tabelle (Blueprint), dann unser Motor roh.
|
||||
pub fn rein_roh() -> bool {
|
||||
static A: OnceLock<bool> = OnceLock::new();
|
||||
*A.get_or_init(|| rein() && std::env::var("MOTOR_REIN_ROH").is_ok_and(|x| x == "1"))
|
||||
}
|
||||
const GRUND_SPLASH: &str = " [Splash: Vorflop-Tabelle ohne totes Geld]";
|
||||
const GRUND_NACHPOST: &str = " [Nachpost: Vorflop-Tabelle ohne Nachpost]";
|
||||
|
||||
fn schalter(k: &str, w: &str) -> bool {
|
||||
std::env::var(k).is_ok_and(|x| x == w)
|
||||
@@ -1208,7 +1200,7 @@ mod splash_spec {
|
||||
// der Splash kommt nicht aus dem Stapel des Helden (Platz 1 -> sein Platz 0)
|
||||
assert_eq!(k.basis["players"][0]["stack_start"], 10_000);
|
||||
assert!(k.basis["players"].as_array().unwrap().iter().all(|p| p.get("dead").is_none() && p.get("live_post").is_none()));
|
||||
assert_eq!(k.vorflop_grund, super::GRUND_SPLASH);
|
||||
assert_eq!(k.vorflop_grund, " [Splash: Vorflop-Tabelle ohne totes Geld]");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -1218,7 +1210,7 @@ mod splash_spec {
|
||||
assert_eq!(k.basis["players"][3]["dead"], 50);
|
||||
assert_eq!(k.basis["players"][3]["stack_start"], 10_050); // Stapel jetzt + Ante
|
||||
assert!(k.basis.get("dead_money").is_none());
|
||||
assert_eq!(k.vorflop_grund, super::GRUND_SPLASH);
|
||||
assert_eq!(k.vorflop_grund, " [Splash: Vorflop-Tabelle ohne totes Geld]");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -1231,7 +1223,7 @@ mod splash_spec {
|
||||
assert_eq!(h.len(), 3); // SB, BB, Call; der Nachpost steht nur in players
|
||||
assert_eq!(h[2]["type"], "call");
|
||||
assert!(k.basis.get("dead_money").is_none());
|
||||
assert_eq!(k.vorflop_grund, super::GRUND_NACHPOST);
|
||||
assert_eq!(k.vorflop_grund, " [Nachpost: Vorflop-Tabelle ohne Nachpost]");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user