Skip to content

Perf: is_in_check_after_move performs a full game copy per candidate move #42

Description

@dbqpdb

King.is_in_check_after_move calls game.copy() and then make_move() for every candidate move generated by every piece, then generates the full opponent move list.

For an RLM engine that just plays random legal moves, this is fine and not worth fixing yet — flagging for visibility if/when search depth ever becomes a goal. At that point, copy-on-write or a make/unmake pattern will be necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions