无法在 python 中为非确定性有限自动机显示表格和图表a

问题描述 投票:0回答:0

我想寻求帮助解决这个问题,我想知道是不是我的代码有问题,或者有没有我没有安装的工具或扩展

from automata.fa.nfa import NFA

from visual_automata.fa.nfa import VisualNFA

visualnfa = VisualNFA(
    states={'Q0', 'Q1', 'Q2'},
    input_symbols={'A', 'B'},
    transitions={
        'Q0': {'A': {'Q0'}, 'B': {'Q0','Q1'}},
        'Q1': {'A': {'Q2'}, 'B': {'Q1'}},
        'Q2': {'A': {'Q2'}, 'B': {'Q2','Q1'}},
    },
    initial_state='Q0',
    final_states={'Q0','Q1'},
)

visualnfa.table;
'''

The output is like this : AttributeError: 'frozendict.frozendict' object has no attribute 'deepcopy'.

I've tried to follow the suggestions on other websites and also YouTube, but still can't solve this problem, please help me friends
python automata finite-automata nfa automata-theory
© www.soinside.com 2019 - 2024. All rights reserved.