main function

void main(
  1. List<String> args
)

Implementation

void main(List<String> args) async {
  // Vocabulary: 4096 (moves) + 1 (<start>) + 1 (.) = 4098
  const int vocabSize = 4098;
  const int bigSize = 128; // Increased for policy complexity
  const int blockSize = 16;
  const int startToken = 4096;
  const int endToken = 4097;

  final gpt = TransformerDecoder(vocabSize: 4098, embedSize: 128);

  final model = MuZeroModel(gpt, bigSize); // Your model loading logic
  const String checkpointPath = "muzero_chess_v1.json";
  await loadModuleParameters(gpt, checkpointPath);

  if (args.contains('--uci')) {
    final handler = UCIHandler(model);
    handler.start();
  } else {
    // Start the trainer loop we wrote earlier
  }
}