Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问oplisttab是怎么得到的? #2

Open
LeslieChe opened this issue Apr 1, 2024 · 2 comments
Open

请问oplisttab是怎么得到的? #2

LeslieChe opened this issue Apr 1, 2024 · 2 comments

Comments

@LeslieChe
Copy link

    static char oplisttab[][6] = {
        { CUBE_OP_F, CUBE_OP_U, CUBE_OP_D, CUBE_OP_L, CUBE_OP_R },
        { CUBE_OP_U, CUBE_OP_D, CUBE_OP_L, CUBE_OP_R, CUBE_OP_B },
        { CUBE_OP_B, CUBE_OP_R, CUBE_OP_U },
    };

第1行和第2行各有5个操作,第3行只有3个,不太懂。都改成6个不行吗?

@rockcarry
Copy link
Owner

魔方的操作啊,F、U、D、L、R

@rockcarry
Copy link
Owner

那个 search 实际上是一个分阶段的广度优先搜索
每个阶段,可能会送到的 op 个数是不一样的,op 个数越多,搜索数扩展的叶子节点就越多。
在魔方接近还原的阶段,需要搜索的 op 会更少一些。
所以有了 oplisttab 这个表格

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants