Playing “Who's the Spy” locally with an LLM

It's Chinese New Year, and everyone is talking about DeepSeek. Ruirui wants to play "Who's the Spy" but can never round up enough people, so I built an AI-powered "Who's the Spy" game bot that calls an LLM to generate character descriptions and voting strategies — but I ran into problems like unstable model output and formatting errors. After tweaking the model and the prompts over and over, I finally got the basic functionality working, and the whole process was full of funny mistakes and challenges.

AI

Multipart body must have at least one part

Using RN caused this error. After checking, the problematic code is: postJson(cmd, dataObj) { let url = Defines.SERVER_ADDR + cmd; let formData = new FormData(); ...

App Development

GreenSock Animation Platform now has a JS version

The new version of greensock’s tween now comes with a JS version. Based on animation performance tests, the more particles there are, the bigger the performance advantage over other frameworks. htt...

Web Frontend

ie7-js

A JavaScript library to make Microsoft Internet Explorer behave like a standards-compliant browser. It fixes many HTML and CSS issues and makes transparent PNG work correctly under IE5 and IE6. I c...

Web Frontend

In IE, the .type of an input element is read-only!

Today I hit an error and discovered that in IE the .type of an input element is read-only!

Web Frontend

oEmbed: An open format for embedding media

oEmbed is a brand-new spec, announced by Cal Henderson (Flickr), Mike Malone, Leah Culver (Pownce), and Richard Crowley (OpenDNS). oEmbed is an open format for standardizing how images, videos, links, or other media get embedded, and for sidestepping media providers’ APIs (or the screen scraping you’d need when they don’t have one). When a user posts a link that points straight at a specific media resource, it lets a site embed that media quickly and painlessly. Here’s how it works: it converts the link accordingly — that is, it turns the image or video into XML or JSON that tells you how to embed the media.

Web Frontend