News for hackers. Stuff that matters.
Re:MTG Bench: Testing how well LLMs can play magic by veqq on Friday June 12, 2026 @12:30AM (#48499939)
MTG: Arena uses a rules engine CLIPS (a s-expr expert system based on the RETE engine), which an acquaintance wrote a course for: https://ryjo.codes/tour-of-clips.html and even a declarative chat server: https://ryjo.codes/articles/a-simple-tcp-server-written-in-g...

    (defrule connection
      (connection ?id)
      =>
      (println "User " ?id " connected")
      (printout ?id "Welcome to the chatroom from CLIPS!" crlf)
      (do-for-all-facts ((?f connection)) (neq ?id (nth$ 1 ?f:implied))
          (printout (nth$ 1 ?f:implied) "User " ?id " connected" crlf)))
    
    (defrule say
      (connection ?id)
      ?f <- (message-buffered ?id)
      ?ff <- (message ?id ~/me ?message)
      =>
      (retract ?f ?ff)
      (printout ?id "You: " ?message crlf)
      (do-for-all-facts ((?f connection)) (neq ?id (nth$ 1 ?f:implied))
        (printout (nth$ 1 ?f:implied)
         ?id ": " ?message crlf)))
Re:MTG Bench: Testing how well LLMs can play magic by josh_p on Friday June 12, 2026 @08:34PM (#48510994)
I was about to ask why someone would reach for CLIPS over implementing their own rules engine in the language of the rest of the application (I did this once).

It’s answered on the same site. https://ryjo.codes/articles/forgoing-implicity-using-abstrac...

Thank you for sharing! A lot of good stuff here!