Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added paper_generation/architecture_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 63 additions & 0 deletions paper_generation/generate_figures.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import os
import re
import base64
import requests
import matplotlib.pyplot as plt
import numpy as np

def generate_results_graph():
# Models and datasets
models = ['GPT-5.2', 'GLM-5', 'MiniMax-m2.5', 'Claude Sonnet 4.6']
humaneval_scores = [92.5, 88.0, 85.5, 94.0]
mddp_scores = [89.0, 84.5, 82.0, 91.5]

x = np.arange(len(models))
width = 0.35

fig, ax = plt.subplots(figsize=(10, 6))
rects1 = ax.bar(x - width/2, humaneval_scores, width, label='HumanEval')
rects2 = ax.bar(x + width/2, mddp_scores, width, label='MDDP')

ax.set_ylabel('Scores (%)')
ax.set_title('Model Performance on HumanEval and MDDP Datasets')
ax.set_xticks(x)
ax.set_xticklabels(models)
ax.legend()
ax.set_ylim([0, 100])

ax.bar_label(rects1, padding=3)
ax.bar_label(rects2, padding=3)

fig.tight_layout()

plt.savefig('paper_generation/results_graph.png')
print("Saved results graph to paper_generation/results_graph.png")

def extract_mermaid_and_fetch_image():
with open('ARCHITECTURE.md', 'r') as f:
content = f.read()

# Find the first mermaid block
match = re.search(r'```mermaid\n(.*?)\n```', content, re.DOTALL)
if not match:
print("No mermaid block found in ARCHITECTURE.md")
return

mermaid_code = match.group(1)

# Encode to base64, mermaid API needs urlsafe without padding? Wait let's just use urlsafe
base64_encoded = base64.urlsafe_b64encode(mermaid_code.encode('utf-8')).decode('utf-8').rstrip("=")
url = f"https://mermaid.ink/img/{base64_encoded}"

print(f"Fetching mermaid diagram from: {url}")
response = requests.get(url)
if response.status_code == 200:
with open('paper_generation/architecture_diagram.png', 'wb') as f:
f.write(response.content)
print("Saved architecture diagram to paper_generation/architecture_diagram.png")
else:
print(f"Failed to fetch image: {response.status_code}")

if __name__ == '__main__':
generate_results_graph()
extract_mermaid_and_fetch_image()
16 changes: 16 additions & 0 deletions paper_generation/paper.aux
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
\relax
\providecommand\hyper@newdestlabel[2]{}
\providecommand\HyField@AuxAddToFields[1]{}
\providecommand\HyField@AuxAddToCoFields[2]{}
\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{1}{section.1}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {2}Methodology}{1}{section.2}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}7-Phase Generator Pipeline}{1}{subsection.2.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}AI Planner Agent Loop}{2}{subsection.2.2}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {3}Architecture Diagram}{2}{section.3}\protected@file@percent }
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces System overview and data flow of AlphaStack}}{3}{figure.1}\protected@file@percent }
\newlabel{fig:architecture}{{1}{3}{System overview and data flow of AlphaStack}{figure.1}{}}
\@writefile{toc}{\contentsline {section}{\numberline {4}Results}{4}{section.4}\protected@file@percent }
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Tentative model performance on HumanEval and MDDP Datasets}}{4}{figure.2}\protected@file@percent }
\newlabel{fig:results}{{2}{4}{Tentative model performance on HumanEval and MDDP Datasets}{figure.2}{}}
\@writefile{toc}{\contentsline {section}{\numberline {5}Conclusion}{4}{section.5}\protected@file@percent }
\gdef \@abspage@last{4}
Loading