XML to Python Parsers

These parsers are for converting problems from AIspace (XML format) to AISpace2 (Python code).

About

Change path_to_xml to the path to your XML file and run the script. The result is the Python code to construct the corresponding problem.

Search Parser


In [ ]:
from aispace2.jupyter.search import xml_to_python

path_to_xml = "../aispace2/jupyter/search/search_tree.xml"  ## Fill in the Path to your XML file
xml_to_python(path=path_to_xml)

CSP Parser


In [ ]:
from aispace2.jupyter.csp import xml_to_python

path_to_xml = "../aispace2/jupyter/csp/csp_simple1.xml"  ## Fill in the Path to your XML file
xml_to_python(path=path_to_xml)

Belief Network Parser


In [ ]:
from aispace2.jupyter.bayes import xml_to_python

path_to_xml = "../aispace2/jupyter/bayes/bn_fire_alarm.xml"  ## Fill in the Path to your XML file
xml_to_python(path=path_to_xml)

In [ ]: