 we had this game that will show ECG waveforms and you have to click on it. When the ECG is abnormal, it will give you a hit. When the ECG is normal as such and you click on it, it will give you a false alarm. So you detected a false, a false detected then abnormal EG. Now it should give me a correct rejection. This is another normal, it should give me now a correct rejection. If I do not click on it, if I do click on it, it gives me a false alarm because that's a false detection. It was normally ECG, but we clicked on it. Mises, yeah, and when we had an abnormal ECG like this and we didn't click on it, so we should have another miss and it will give you an overall score. It should be another hit and so on and so forth. You can see videos from earlier. I'm biased because I made it, but I can reach a score about 1000 or so, essentially for a very long time, keeping it with no false alarms or misses. And what we want to try out, so as you know, just open this in the new tab, we have this phasological neural network. We want those to play the game. So essentially what we want to do is have some sort of algorithm that is playing the game by itself, just by looking at the signal, potentially, no, it won't be an image. You will feel the actual dot points. So time series data into a phasological neural network algorithm for it to be able to essentially play the game itself and be able to detect if the, in this case, if the ECG is abnormal or not, that's what we would, that's a hard one to detect because it didn't have that little notch after the peak and I missed that one. Yeah, that's an abnormal one as well. So essentially, yeah, we want to train an algorithm phasological neural network to play the game, essentially be a gamified cardiologist that detects abnormal ECG. So how shall we go about it? We will use chgpt. Basically, we have chgpt to do it for us. So we have our phasologic. Instead of phasologic, because that should be easy, it's like an explainer should be like an explainable AI thing. We have this main JavaScript. A main thing about it is that we should have those, I don't see it, why we should have those regions. So we're looking at certain, we're extracting certain parameters, certain features from the signal, like amplitude, frequency. In this case, we could go for the number of peaks, up and down peaks. That would be a good one. It should be highly successful. So we can do amplitude frequency and the number of peaks and that one can be split into up and down as well. Well, gp, but what I'm looking for in this code is fetching ag that are normalizing it, displaying artifact risk. Oh, this is okay. So this one has a Python code as well. Right. So it does have a backend. Yeah, ideally, yeah, we'll ask chgpt or if you have any ideas about it, please do let me know. But we essentially want to do as much as possible in the front end. So we don't have a load my server. But if necessary, yeah, we're happy to do backend calculations as well. Like in this case, where, yeah, all the calculations are made the backend using Python. So you have this membership function. So I'm scrolling through this thing too much, but I'm looking for a specific, yeah, so I'm looking for this membership function. So it's essentially for every for every feature. This is assuming normalizing. That's what was the problem. Why things didn't work in the previous live streams is that we weren't normalizing properly. But essentially, this means that you will have the number of parameters features that we're extracting from the signal, in this case, amplitude and frequency. And then we split it into three ranges, low, medium and high. And then we decide the output in what case the output, which is indicating the likelihood of an artifact in that case was the e g, but it doesn't matter can be e cg as well, in which case it's low, medium and high as well. And you have those fuzzy rules that essentially say if the amplitude and frequency is low, the artifact, well, it says risk, but it really should be artifact probability is low. If the amplitude is medium, frequency is medium, the artifact probability is medium. And by the same logic, if amplitude is high, frequency is high, the artifact probability is high as well. So obviously, like a simplistic thing that actually didn't work because the output of amplitude and frequency was not properly normalized between zero and one. So we could ever fix this, which could be nice, or start from scratch. Let me know what you think. What do you think? What do you think we should do? Start from scratch or continue fixing stuff. So let me know in the comments, wherever you're watching this from. Just checking the chat, there's nothing in the chat. So we can continue. So close that for a second. So what I said, if we're starting from scratch, we also want to include an option to do the same using a neural network algorithm, a fuzzy logic, and we could apply it onto this ECG game. So that's that prompting. Because I have this, what is it, limit of 40 messages per three hours, hopefully one reach. So we are live streaming. It's a development session. We would like to make a flask application, preferably most of the development will be in JavaScript, and only if necessary, we do things in the back. And we would like to a few things on body chaos.com. So currently, fuzzy logic and neural network tools do not work. We would like to do something from scratch. We would like to combine them with the ECG game, so essentially the algorithms playing the game themselves, trying to detect abnormal ECG a waveform pattern, probably looking at amplitude frequency, and the number of positive and negative peaks. We will start with the fuzzy logic algorithm first. And I'll provide you with the code that we currently have alternatively, you could just generate prompts for me to use in GitHub, co-pilot, co-pilot. Yep. What? That's unfortunate. What just happened? I am logged in and everything. Did I not pay? Oh, let me double check. Otherwise, we'll just use a GitHub co-pilot. Let's use a GitHub co-pilot straight away. So we don't waste time, precious time. Always trying to keep trying to use this workspace feature that meant to be looking at my, at other files as well, that never worked. It's collecting workspace structure. In the meantime, double check what happened to GitHub co-pilot. Yeah, I always get this array buffer location fail. Pretty sure. I've seen videos of people using it successfully on Windows. So it must be not working on Linux, which is a shame that we have to deal with it. Just deal with it. Okay, so let's try the same prompt, but then we need to select a code. We'll try it anyway. Yes, it's using where currently have the cursor. It's giving me a boilerplate template for a flask application. That's okay. Yeah, we'll start from the code for the ECG game. Yeah, this one is giving me generic stuff. Close the gesture group. Let's close them all from now. And we need the ECG game. What's called cardio quest. Yeah, it's like silly names that I give stuff and then I forget what it's actually called. Yes, we have cardio quest. Yeah, I have a lot to it. Which Python do we use? Do some bit of a messy project. Let's look into the index HTML. We're using two JavaScripts. They should be in, I don't know why they're not in the sub folder, but okay. We have the game logic and we have the waveforms. Those are the waveforms. And what else do we have? And we have the Python. This one's having a lint error. Why it got locked out. That's weird. Sounds like we'll have to be using a GitHub co-pilot for this session. Okay, I'm logged in now. Where was the prompt? This was the prompt. Yeah, so the trajectory is giving more better responses generally. Yeah, it's working now. This can involve setting thresholds for amplitude, frequency and P count to classify the waveforms. Once you provide the current code, we can start refining or building upon it. As for GitHub co-pilot, I can certainly help generate prompts. These prompts can guide co-pilot to generate specific code snippets or functionalities you need. For instance, if you need a function to analyze ECG waveforms, a prompt could be write a JavaScript function to analyze an ECG waveform, taking an array of data points as input and returning an object with amplitude, frequency and P count. Remember, integration of these components will be key. Ensure that your Flask back end can efficiently handle requests from the front end and process them through your fuzzy logic and neural network algorithms. Also, consider how the game interface will display the ECG analysis results. Let's start with the fuzzy logic algorithm. Share the current code and we can work on generating specific prompts or refining the algorithm as needed. Okay, so we have the current code, have the game rules and everything. Yeah, we'll be quite hard integrating all these things. Yeah, the code is pretty much just the canvas for the game. Just the canvas for the game. The whole there's not much in HTML. Okay, we might be doing more prompts for a GitHub co-pilot. At this stage, I can provide some images of how the game looks like. Yeah, because the GitHub co-pilot doesn't have that option. Yep. Sure, if you provide images of how the ECG game currently looks, I can help you create detailed prompts for GitHub co-pilot. These prompts will be designed to guide co-pilot in developing specific functionalities or UI elements for your game. Please go ahead and share the images. This is what the normal ECG looks like. Yep. And this is an example of abnormal ECG. That's a good starting point. Based on your image of the ECG game interface, here are some prompts you could use with GitHub co-pilot to enhance the game. Create a JavaScript function that randomly generates ECG waveforms with predefined normal and abnormal parameters and displays them on a canvas element. Develop a scoring system in JavaScript for an ECG game where points are given for correctly identifying abnormal ECG patterns and deducted for false identifications. Write a JavaScript algorithm that can detect the number of peaks in an ECG waveform to differentiate between normal and abnormal patterns. Implement a JavaScript function to update game statistics, such as hits, false alarms, great rejections, and misses, based on the user's interactions with the ECG waveforms. Remember to clarify the requirements and constraints within your prompts to get the most accurate code generation from co-pilot. Understood. That's an abnormal ECG example. To work with GitHub co-pilot for your project, you might consider prompts like, write a JavaScript function that compares a given ECG waveform against normal and abnormal criteria and decides if the pattern is abnormal. Develop a JavaScript class that represents an ECG game, including methods for scoring, tracking statistics like hits, false alarms, and misses, and rendering both normal and abnormal ECG waveforms. Create a function that uses Canvas to animate an ECG waveform transition from normal to abnormal to simulate real-time monitoring in the game. Each prompt should be as specific as possible, including parameters, expected outcomes, and any edge cases you want to handle. This will help GitHub co-pilot generate the most useful code snippets for your project. Right. Let's quickly try the workspace again, and let's skip out the project structure. I think I know what the problem is. I think it's because we have like too many files to look through. I don't know why is it not just looking. Yeah. It's always giving me this right buff allocation error. Yeah. This clear works in the same way like that button. That's okay. Okay. There's a bit of a misunderstanding. The current application already works, current, and we want to make a different version of it, which will include an algorithm that could play the game by itself using fuzzy logic on neural network. We'll focus on fuzzy logic first. Yep. Got it. You're aiming to automate the game using a fuzzy logic-based algorithm that can analyze ECG patterns and decide which are abnormal without human input. Here are some GitHub co-pilot prompts that could assist in developing such a feature. Design a fuzzy logic algorithm in JavaScript that can analyze ECG waveforms and identify abnormal patterns based on criteria such as amplitude variations, irregular frequencies, and unusual peak counts. Implement a fuzzy logic system that evaluates ECG data and makes decisions with a degree of uncertainty, allowing the game to simulate decision making similar to that of a human expert. Code a simulation loop in JavaScript where a fuzzy logic algorithm receives continuous ECG waveform data, analyzes it, and autonomously makes decisions to identify abnormal patterns as part of an ECG game. Make sure to set clear parameters for what constitutes a normal and an abnormal ECG within the context of your game so the fuzzy logic can be tailored accordingly. Okay, let's read this quickly, just primarily after or not read this because it's too long. I know what we know what it's doing overall. Question is, is there a use of a Python script if so, explain? It's taking every time. Now I'm confused. Now I'm gonna use co-pilot, explain this. I'm pretty sure the thing is running as a flask application. I know it because, yeah, because this would not run. Go back there, the flask application will run if we run the Python code. Okay, this is not running. Well, that must be because actually using a different, just open a containing folder, a code request, just see game logic, the game logic pi, right, this one is there. Okay, game logic, game logic pi is what's actually running the thing. I have to close that run this. Okay, this is running in Python itself, which is not cool. It's meant to be the app app by the flask. That one is not running. Getting a 4044 script.js called again. Check all the Python, all the Python files if they are flask applications or not. This one is not. Game logic is not, it's only pi. Okay, this is a problem because this is the one we have deployed. It's working on the site and network script.js. Get a three of four. Okay, not modified. I don't need to know it's not modified. It's loaded in under two seconds, which is quite a lot still. Oh, I know why. I know why it's not running. It will not run locally. That's why. Because there's a check for if we are running locally or not. It's there. It's always these technical problems that prevent us from progressing, progressing. And it's quite unfortunate. Actually, I don't know why is it not having trouble with the rest of the files. We can ask about it. We have one function that is not defined at all. Since potentially this is not what we have deployed. Yeah, we might not have much time to fix it today. I'll do it in another time. Just thinking Git potentially old and earlier version of this thing. And potentially that's why I'm not seeing the new code to go check it out. We had some problem with Git. Yeah, we generally don't mind committing on the whole project. It just will be very messy. There are some Git ignore functions that we use, files that we defined. But that's okay. Then some of the commits do not work because we have some issues with the logging credentials. So really, but looking at these changes, it's an untracked file. I actually like to remove this one. Yeah, this is all the Git commands. They're quite confusing. You can quickly check, quickly check Git. And then yes, a CardioQuest is updated two weeks ago. A CardioQuest app by, let's say, this generate even way from Segment. Oh, it's imported from static game. That's commented out. Okay, how do I, what's blame? Can view code at that point? Yeah, I don't know why that is commented out. It's actually wrong. Yeah, that's commented again, but then we're actually trying to use it. So it doesn't make sense. I'll blame Git for stuffing it up. It's also odd that we, yeah, we have, as I said, we haven't currently deployed, but it's not working. I'll see you in a bit. Bye.