<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Lee Carrozza on Medium]]></title>
        <description><![CDATA[Stories by Lee Carrozza on Medium]]></description>
        <link>https://medium.com/@five41?source=rss-d3b75b4211f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*9m2C_iQiSYsT0yue</url>
            <title>Stories by Lee Carrozza on Medium</title>
            <link>https://medium.com/@five41?source=rss-d3b75b4211f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 12:40:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@five41/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[FAST: Formative Analysis of Scratch Trees]]></title>
            <link>https://medium.com/carnegie-mellon-robotics-academy/fast-formative-analysis-of-scratch-trees-2a15d3000a52?source=rss-d3b75b4211f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a15d3000a52</guid>
            <category><![CDATA[research]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[formative-assessment]]></category>
            <category><![CDATA[education-technology]]></category>
            <category><![CDATA[scratch-programming]]></category>
            <dc:creator><![CDATA[Lee Carrozza]]></dc:creator>
            <pubDate>Thu, 18 Dec 2025 15:03:52 GMT</pubDate>
            <atom:updated>2025-12-18T15:15:26.606Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mtmTgYGBFDcSUfXC-BU21Q.jpeg" /></figure><p>FAST is a backend tool that computes structural feedback for Scratch-based programming activities, particularly in robotics education. By analyzing and comparing student work against idealized solution templates, FAST enables real-time, interpretable feedback without enforcing a single “correct” solution. As students iterate on robot programming challenges, they get a visual indicator of whether they are approaching a potential solution, or getting further away. This information is elevated to the educator, who can do an intervention with the student when necessary. Any application that integrates Scratch Blocks can use FAST to get a better understanding on how the users (students) are solving coding problems.</p><h3>Core Functionality</h3><p>FAST’s key operation is the computation of an <em>edit distance</em> between a student’s program and an exemplar solution. It works as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TON6SqUEPtGPwj2dgMVbfQ.jpeg" /></figure><ol><li><strong>Scratch JSON Parsing to AST<br></strong>FAST converts a student’s Scratch JSON code into an abstract syntax tree (AST) using a custom-built parser. The parser supports standard Scratch block categories. Developers can extend it to support custom blocks or domains by modifying the parser definitions.</li><li><strong>Structural Comparison Using Breadth-First Search<br></strong>A breadth-first search traversal is used to compare the student’s AST to a reference AST, calculating the minimum number of edits (insertions, deletions, moves) required to transform the student’s program into the target solution. Each action type has a weight, currently defined as static constants in distance.py</li><li><strong>Distance Feedback<br>- </strong>The resulting distance metric serves as a proxy for how structurally “close” a student’s program is to a high-quality solution. This value can be integrated in two primary ways, depending on the educational context:<br>- Developers can use the distance metric to power facilitator-facing dashboards that monitor learner progress across activities. These interfaces can support real-time coaching, intervention, or retrospective analysis of student effort and intent.<br>- Alternatively, the distance value can be surfaced to students directly (e.g., as a progress bar or trend indicator), enabling them to reflect on their approach and make iterative improvements. In such applications, developers are encouraged to design interfaces that discourage unproductive guess-and-check behaviors.</li></ol><p>Currently, FAST supports comparison against a single canonical solution. Future work could expand support for multi-solution comparisons, using the lowest-distance match among a set of expert-authored exemplars.</p><p><a href="https://youtu.be/cFmTWWWGROE?si=XzBBPzWX7NRS3CI6">https://youtu.be/cFmTWWWGROE?si=XzBBPzWX7NRS3CI6</a></p><h3>Educational Context &amp; Motivation</h3><p>This work is part of a broader research initiative supported by the <strong>National Science Foundation (Grant #2118883)</strong>. The project investigates AI-supported formative assessment in K–12 CS education, focusing not only on students or teachers individually but on the full instructional triangle: student–teacher–artifact.</p><p>FAST emerged from the observation that instructional interactions are often highly contextual and resistant to rigid automation. Rather than dictating student pathways, FAST seeks to offer transparent and flexible insight into student progress.</p><p>Check out our research page for more information: <a href="https://www.cmu.edu/roboticsacademy/Research/facilitate.html">https://www.cmu.edu/roboticsacademy/Research/facilitate.html</a></p><h3>Intended Audience</h3><p>FAST is aimed at developers and researchers building Scratch-based learning tools.</p><h3>Current Capabilities</h3><ul><li>Convert Scratch JSON to AST (custom, extensible parser)</li><li>Compute edit distance using breadth-first search</li><li>Send distance metrics via API-style interaction</li><li>Designed for backend integration. There is no UI included outside of visualizing trees and logging.</li></ul><h3>Known Limitations</h3><ul><li>Only compares a single student program against a single solution</li><li>No concept of node importance based on tree depth (yet)</li><li>Static weighting of edit operations</li><li>No UI. Front-end design is left to downstream users</li></ul><h3>Usage &amp; Integration</h3><p>FAST operates as a backend module. It expects two Scratch programs (in JSON format): the student’s current attempt and the reference solution. It returns a numerical distance.</p><h3>Development and Deployment</h3><p>FAST is designed as a serverless backend for providing real-time structural feedback over HTTP. It uses Flask, Zappa, AWS Lambda, and API Gateway to create a lightweight, scalable deployment pipeline.</p><h3>Local Development (Flask)</h3><p>To run FAST locally for development or debugging:</p><p>poetry run flask — app facilitate.server run</p><p>You can then access endpoints like /diff, /distance, and /progress on localhost and use included scripts such as scripts/invoke-diff.py to simulate requests.</p><p><strong>Production Deployment (Serverless via AWS Lambda)</strong></p><p>FAST is deployed to AWS Lambda via<a href="https://github.com/Miserlou/Zappa"> Zappa</a>, which automatically packages the Flask app and provisions API Gateway endpoints.</p><h4>Step 1: Create a zappa_settings.json</h4><p>A sample configuration file is provided as zappa_settings.example.json. To deploy, copy and customize it:</p><p>cp zappa_settings.example.json zappa_settings.json</p><p>Edit the file to include your own AWS profile, S3 bucket, and any environment-specific settings.</p><h4>Step 2: Deploy to AWS</h4><p>With AWS credentials configured and the settings file in place:</p><p>poetry run zappa deploy</p><p>To update a deployment after code changes:</p><p>poetry run zappa update</p><p>To remove the deployment:</p><p>poetry run zappa undeploy</p><p><strong>Endpoint Overview</strong></p><p>API Gateway will expose the following HTTP PUT endpoints:</p><ul><li>/diff: Returns an edit script between two Scratch programs</li><li>/distance: Returns a structural edit distance</li><li>/progress: Returns distances to multiple reference solutions</li></ul><p>Each expects JSON-formatted Scratch Blocks code as input.</p><h3>Roadmap</h3><p>Potential areas to explore:</p><ul><li>Weighted penalties based on AST depth (e.g., mistakes early in code should not be more impactful)</li><li>Multiple-solution comparison with minimum-distance selection</li><li>Support for additional block types and custom block integration</li><li>Community feedback for weight tuning and interpretation design</li></ul><h3>Contributing &amp; License</h3><p>FAST is released under the <strong>MIT License</strong> and maintained under the<a href="https://github.com/cmroboticsacademy"> Carnegie Mellon Robotics Academy GitHub</a>.</p><p>We welcome:</p><ul><li>Feature suggestions</li><li>Custom block parsers</li><li>Multi-solution extensions</li><li>Research use cases and integrations</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a15d3000a52" width="1" height="1" alt=""><hr><p><a href="https://medium.com/carnegie-mellon-robotics-academy/fast-formative-analysis-of-scratch-trees-2a15d3000a52">FAST: Formative Analysis of Scratch Trees</a> was originally published in <a href="https://medium.com/carnegie-mellon-robotics-academy">Carnegie Mellon Robotics Academy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rapid Prototyping with Unity and React]]></title>
            <link>https://medium.com/carnegie-mellon-robotics-academy/rapid-prototyping-with-unity-and-react-f3f12b5d7707?source=rss-d3b75b4211f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3f12b5d7707</guid>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[create-react-app]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Lee Carrozza]]></dc:creator>
            <pubDate>Mon, 10 Aug 2020 19:25:58 GMT</pubDate>
            <atom:updated>2020-08-18T16:37:33.393Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d22SP38YDAwSZ92gHJvziA.jpeg" /></figure><p>Web applications are great way to quickly reach a lot of users without the hassle of native client installs and play store downloads. Web frameworks such as React allow page components to communicate and respond to user interaction much like traditional applications. Being web-focused, React also offers exceptionally strong support for adaptive and responsive layout, e.g. smoothly re-flowing the page content for a vertically-oriented mobile device or browser window.</p><p>However, applications with complex UI and internal state — like a 3D game or simulation — are largely out of scope for React. Instead, such tasks are the domain of game engines like Unity3D. Unity can export WebGL applications which run self-contained game worlds with 3D rendering, physics interactions, and so on. Unity WebGL can also, in principle, communicate with the browser via jslib plug in and <a href="https://www.npmjs.com/package/react-unity-webgl">react-unity-webgl</a>.</p><p>In theory, then, we can get the best of both worlds for rich interactive web applications by implementing one or more complex worlds in Unity WebGL, then allowing them to communicate with each other via the browser.</p><h4>Unity and React Example Project</h4><p>Using this technique, we were able to implement a Machine Vision training simulator composed of three distinct panels — two have unique Unity3D WebGL instances — in a React-based page. Each page has two way communication between the instances of Unity and React’s front end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g_HXke4skpit1gJPqQlgng.png" /></figure><p>Panel #1 displays an assembly line with 3D assets coming down a conveyer belt. Panel #2 handles dataset generation by letting users take snapshots of parts that had been incorrectly classified as they came down the belt. Panel #3 allows players to define ML classes and populate them with snapshots from #2 (a form of Transfer Learning), in order to train the Machine Vision model to better classify parts coming down the belt. The results of this model training are visible in Panel #1, as parts in the next batch are classified under the retrained model.</p><p>Again, “under the hood”, this is all accomplished by embedding two separate instances of Unity WebGL in a single React page, and passing key data (3D asset identifiers, bitmap snapshots, ML model output) back and forth between them in messages.</p><p>See a live example of this project <a href="https://rah-tensorflow-js-transfer-learning-demo.s3.amazonaws.com/index.html">here</a>.<br>Also, check out the open source project <a href="https://github.com/cmroboticsacademy/rah_image_classification_prototype">here</a>.<br>For more information on what inspired this template, check out our article <a href="https://medium.com/carnegie-mellon-robotics-academy/how-we-used-transfer-learning-to-create-an-image-classifier-in-the-browser-57a0abb4ccd3">here</a>.</p><h4>A Template for Messaging Integration</h4><p>In practice, combining these two frameworks is a bit tricky. Unity provides great documentation on how to communicate with the browser, but no out of the box solution. That’s where <a href="https://github.com/cmroboticsacademy/cra-template-unity-react">cra-template-unity-rect</a> (CTUR) template comes in.’</p><p>CTUR is a <a href="https://reactjs.org/docs/create-a-new-react-app.html">Create React App</a> template, installed with a single CLI command, that sets up a messaging architecture for Unity WebGL games to send and receive messages to and from the browser. These messages are reusable and customizable.</p><p>Ultimately, we hope that CTUR will significantly speed up development of web applications that can take advantage of both Unity’s beautiful 3D environments and React’s flexibility and familiarity.</p><p>CTUR is completely open source and can be found <a href="https://github.com/cmroboticsacademy/cra-template-unity-react">here</a>.</p><h4>Installing</h4><ol><li>Install <a href="https://www.npmjs.com/package/npx">npx</a> and <a href="https://nodejs.org/en/download/">node</a></li><li>Open a terminal and go to a folder where you want to download the template.</li><li>Enter the command: npx create-react-app my-unity-react-app --template @carnegie-mellon-robotics-academy/cra-template-unity-react</li><li>See <a href="https://github.com/cmroboticsacademy/cra-template-unity-react/blob/master/README.md">Readme</a> for how to build and develop.</li></ol><h4>How it works</h4><p>We send messages back and forth as serialized objects. Our project follows a basic structure on both sides. Each message has a topic. This topic is always a string. Components can subscribe to these topic in order to receive messages. Messages also have a message object. This object contains a method string and a parameters object.</p><pre>{<br>  topic: &quot;test&quot;,<br>  message:<br>  {<br>    method: &quot;startTest&quot;,<br>    parameters:<br>    {<br>      i_testTime: 3,<br>      resolver: &quot;endTest&quot;<br>    }<br>  }<br>}</pre><p>Unity communicates to the browser using a JS lib plugin. Unity has great documentation on how to do it <a href="https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html">here</a>. This plugin allows us to communicate to the browser window. You can add other functions as needed. <a href="https://www.npmjs.com/package/react-unity-webgl">ReactUnityWebGL</a> is an open source package that we used included in the project. It does a nice job of wrapping unity content in a react element.</p><pre>MessageUnityOutgoing: function (str) {<br>  // Send string to ReactUnityWebGL…    <br>  ReactUnityWebGL.MessageFromUnity(Pointer_stringify(str));<br>}</pre><p>Using our unity_api methods, React components can subscribe to topics when it mounts to the DOM. Each method can be imported as needed. This examples shows how to call the method handleTestMessage when Unity sends a message with a topic of “unity_awake”.</p><pre>const unityAwakeSubscriber = { topic: &quot;unity_awake&quot;, callback: handleTestMessage }</pre><pre>useEffect(() =&gt; {<br>  addTopicListener(unityAwakeSubscriber);<br>}, [])</pre><p>We also provide synchronous and asynchronous methods to Unity. You can uses asynchronous methods to wait for a response from Unity. In this example, a react component starts a test. By passing the resolver as the parameter. Unity will know that this promise is waiting on a message with a topic of “endTest”.</p><pre>const handleTest = async () =&gt; {</pre><pre>const msg = { topic: &quot;test&quot;, message: { method: &quot;startTest&quot;,     parameters: { i_testTime: 3, resolver: &quot;endTest&quot; } } }</pre><pre>setTesting(true);</pre><pre>await sendUnityMessageAsync(msg, &quot;endTest&quot;).then((message) =&gt; {<br>  console.log(&quot;Test Ended &quot;, message);<br>  setTesting(false);<br>});<br>}</pre><p>Unity has a similar way of sending and receiving these messages. All messages from react get passed from MessageDispatcher.cs (MD). MD provides methods similar to unity_api. This example shows how to subscribe to a topic and method from another mono-behavior.</p><pre>messageDispatcher.addMessageListener(new Subscriber(&quot;test&quot;, startTest));</pre><p>A subscriber consists of a topic and a callback. The callback startTest must match the method that it expects. Callbacks must receive an object as its parameters. Once you have the parameters, you will need to deserialize them with into the structure it expects.</p><pre>private void startTest(object parameters) {<br> TestParam testParameters = JsonConvert.DeserializeObject&lt;TestParam&gt;(parameters.ToString());<br> <br> // Start the test with the commands. Pass the resolver to end the </pre><pre>}</pre><p>Sending messages is also easy. MD has a method to send data through the js lib plugin. It is passed an object which can be null, and a topic. The object will get serialized and sent as a message with the topic.</p><pre>messageDispatcher.SendData(null, &quot;endTest&quot;);<br>// message output<br>// {topic: endTest, message: null}</pre><h4><strong>How to Contribute</strong></h4><p>The main goal of the template is to help Unity and Web developers integrate unity with modern front end frameworks like React. React offers rich GUI affordances and is a convenient middleware layer to the server.</p><p>This template is in its early stages. There are a lot of additional features that we would like to add to the project. These features all come in handy when working with React and Unity.</p><p>These include:</p><ul><li>Support for managing redux.</li><li>Automatic focus for unity windows and keyboard capture</li><li>Unity build script to build to “dist” automatically.</li><li>Easy setup for multiple instances of unity.</li><li>Unity editor interface where you can build your own messages.</li><li>Support for other frontend frameworks.</li></ul><p>If you think there are any other great frameworks or want to improve the template please become a contributor. <a href="https://github.com/cmroboticsacademy/cra-template-unity-react/">https://github.com/cmroboticsacademy/cra-template-unity-react/</a></p><h3>Carnegie Mellon Robotics Academy</h3><p><a href="https://www.cmu.edu/roboticsacademy/">Carnegie Mellon’s Robotics Academy</a> studies how teachers use robots in classrooms to teach Computer Science, Science, Technology Engineering, and Mathematics (CS-STEM). Our mission is to use the motivational effects of robotics to excite students about science and technology. The Robotics Academy fulfills its mission by developing research-based solutions for teachers that are classroom-tested and foreground CS-STEM concepts.</p><p><strong>This material is based upon work supported by the National Science Foundation under Grant Number 1937063.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3f12b5d7707" width="1" height="1" alt=""><hr><p><a href="https://medium.com/carnegie-mellon-robotics-academy/rapid-prototyping-with-unity-and-react-f3f12b5d7707">Rapid Prototyping with Unity and React</a> was originally published in <a href="https://medium.com/carnegie-mellon-robotics-academy">Carnegie Mellon Robotics Academy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>