Created using Colab

This commit is contained in:
udlbook
2025-04-20 10:42:09 -04:00
parent f65f0b1ddf
commit 44bbfbed91

View File

@@ -4,7 +4,7 @@
"metadata": {
"colab": {
"provenance": [],
"authorship_tag": "ABX9TyPDBtiVN1Oic8RyyLIJuzAu",
"authorship_tag": "ABX9TyNm1191WQYfb72RCYRciluw",
"include_colab_link": true
},
"kernelspec": {
@@ -178,7 +178,7 @@
" sat_result = s.check()\n",
" print(sat_result)\n",
"\n",
" # If it isn't then return\n",
" # If it is then print out solution, otherwise return\n",
" if sat_result == z3.sat:\n",
" result = s.model()\n",
" x_vals = np.array([[[int(bool(result[z3.Bool(\"x_{%d,%d,%d}\" % (i, j, k))])) for k in range(9)] for j in range(9)] for i in range(9)] )\n",