Skip to the content.

Final Review

Review Blog for Final

Retrospective: 5 point overview & reflection

  • Created Stockfish Engine (varying difficulty) and implemented it with Javascript Chess Libraries
  • Create Stockfish Analysis for Evaluation
  • Created Game Manager with CRUD and Automatic Additions and Implementation with Analysis Page
  • Performed Deployment Setup (prior to Vasanth’s shift to Deployment Assistant)
  • Complete integration of my feature with the User API (helped Nikhil N and Vasanth implement user api as well)

Caption: Created Stockfish Engine (varying difficulty) and implemented it with Javascript Chess Libraries

Caption: Stockfish Analysis CRUD Operation for Evaluation

@app.route('/analyze-move', methods=["POST"])
def analyze_move():
    data = request.get_json()
    fen = data["fen"]
    last_eval = data.get("last_evaluation", 0.0) #must be sent by client, and is the evaluation after previous move

    system = platform.system()

    if system == "Darwin":
        stockfish_path = "./stockfish"
    elif system == "Windows":
        stockfish_path = "./stockfish-windows.exe"
    else:
        pass

    stockfish = Stockfish(stockfish_path)
    stockfish.set_fen_position(fen)
    evaluation = stockfish.get_evaluation()
    evaluation = evaluation['value'] / 100.0 #converting from centipawns to pawns

    status = ""
    if evaluation - last_eval > 1.0:
        status = "Brilliant"
    if evaluation - last_eval > 0.5:
        status = "Excellent"
    if evaluation - last_eval > 0:
        status = "Good"
    if evaluation - last_eval < -0.5:
        status = "Inaccurate"
    if evaluation - last_eval < -1.0:
        status = "Mistake"
    if evaluation - last_eval < -3.0:
        status = "Blunder"
    else:
        status = "Neutral"

    best_move = stockfish.get_best_move()
    return jsonify({"evaluation": evaluation, "best move": best_move, "status": status}), 200

Caption: Game Manager

Issues:

  • Standup 5: https://github.com/code259/sprint4_frontend/issues/40
  • Standup 6: https://github.com/code259/sprint4_frontend/issues/38
  • Standup 7: https://github.com/code259/sprint4_frontend/issues/39
  • Burndown (final sprit): https://github.com/users/code259/projects/4?pane=issue&itemId=100054808

Personal Planning:

Planning Issues: Geared toward a functional and realistic goals:

MCQ Review

Categories for Improvement

Question Review

  • Score: 59/67
  • Q11 Color represented by binary triplet: Did the binary to base 10 conversion of the RGB triplet given wrong (11111111, 11111111, 11110000), I approximated the final number instead of calcuating it which was a mistake.
  • Q15 Compare output of program a and b: While half of my logic was correct (i.e the part that identified both programs have same number of entires), I thought they have different values when they didn’t. Going through a few concrete examples for each algorithm would be a useful tool in future problems.
  • Q18 Algorithm to move robot to goal: Didn’t read the question correctly, I thought that the black section was a walll rather than something that termiantes the robot.
  • Q27 Existence of unsolvable problems: Moore’s Law is the observation that the number of transistors on a computer chip doubles roughly every two years, and this improves performance thus by this observation performance is not a problem. Rather it is the lack of algorithms to solve certain complex problems, although some optimization problems are limited by classical computer’s efficiency and provide a premise and usecase for quantum computing in the future. The algorithm option is the better answer despite the other option choice holding true in some cases.
  • Q40 Role of certificate authorities: Didn’t know that a certificate authority verifies the authenticity of encryption keys used in secured communications.
  • Q50 Reasonable time algorithms: I knew that 1 and 3 were reasonable time but wasn’t sure if n^2 was considered reasnonable time for a large n, thus choose the last one despite it not making complete sense. Will employ process of elimination in the future in the future, and will consider n^2 as reasonable run time.
  • Q66 Error in counting perfect numbers: Logical mistake - didn’t read the purpose of the algorithm correctly and thus got wrong answer.
  • Q67 Error in numOccurrences procedure: Didn’t understand the question and what it was asking for, moreover the purpose of the algorithm and its function was confusing for this question.

Improvement

  • Upon last time got the questions about encryption and got a 100% on the network section of the test, which is an improvement compared to last time. Moreover, I had a five question improvement upon last time.
  • However I still need to focus on maintaing focus on the test and reading all the questions carefully even towards the end of the examination, also it seems I need to focus on safe computing and algorithmic error

Project Feature Writeup (CPT & FRQ Language)

The Stockfish Engine was integrated into the project to provide chess analysis and AI-driven gameplay. This involved implementing student-developed procedures that interact with Stockfish via API calls. The Stockfish evaluation and move generation were handled through HTTP and RESTful APIs, utilizing input and output parameters to communicate with the backend. The program functionality was extended to allow users to select difficulty levels, which dynamically adjusted Stockfish’s evaluation depth and response time.

  • This is a procedure called POST, which utilizes the downloaded stockfish engine to tell the frontend the best move to play as the computer
    @app.route('/get-move', methods=["POST"])
    def get_move():
      data = request.get_json()
      fen = data["fen"]
      elo = data.get("elo", 1200)
      print("this is the elo requested", elo)
    
      system = platform.system()
    
      if system == "Darwin":
          stockfish_path = "./stockfish"
      elif system == "Windows":
          stockfish_path = "./stockfish-windows.exe"
      elif system == "Linux":
          stockfish_path = "./stockfish-linux"
      else:
          pass
    
      stockfish = Stockfish(stockfish_path)
      stockfish.set_fen_position(fen)
      stockfish.set_elo_rating(elo)
      best_move = stockfish.get_best_move()
      return jsonify({"move": best_move}), 200
    

CRUD Operations:

  • Overall sequence by first defining the pythonURI in the script tag, then making the fetch request, and then storing all the data in a variable called games, then utilizing javscript to access HMTL elements through the DOM, then utilizing a forEach loop to make the cards, and finally add various listeners on the card buttons to be called dynamically later.
  • CRUD operations included call to algorithm on the frontend with various fetch requests. It utilizes the fetch function, and utilizes the DOM to dynamically update the frontend, this DOM operation shows output/display as information is being displayed to the user.
  • The function below is an algorithm that performs the acts for getting all the games from the database.
  • The function below also shows use of a list as the game object has a list of all the games from the BULK CRUD GET response.
     async function fetchGames(){
          try {
              const response = await fetch(`${pythonURI}/api/pgns`, fetchOptions);
              if (!response.ok) {
                  throw new Error('Failed to fetch groups: ' + response.statusText);
              }
    
              const games = await response.json();
              const container = document.getElementById('cards-container');
              container.innerHTML = '';
    
              games.forEach(game => {
                  const card = document.createElement('div');
                  card.className = 'card';
                  card.innerHTML = `
                      <h2>${game.name}</h2>
                      <h4>Played By: ${game.user_name}</h4>
                      <br>
                      <p>${game.pgn}</p>
                      <button class="button update">Update</button>
                      <button class="button delete">Delete</button>
                      <button class="button analyze">Analyze</button>
                      <button class="button download">Download PGN File</button>
                  `;
    
                  card.querySelector('.delete').addEventListener('click', () => deleteGame(game.id, game.user_name));
                  card.querySelector('.update').addEventListener('click', () => updateGame(game.id, game.user_name));
                  card.querySelector('.analyze').addEventListener('click', () => redirectToAnalyze());
                  card.querySelector('.download').addEventListener('click', () => downloadFile(game.pgn));
                  container.appendChild(card);
              });
          } catch (error) {
              console.error('Error fetching entries:', error);
          }
      }
    
  • The Game Manager was built with full CRUD functionality to allow users to create, update, and manage their chess games. This involved: Create: Users could start new games, which were stored in an SQLite database. Read: Data retrieval was optimized using efficient queries to display active and past games. Update: Moves and evaluations were automatically updated as users played.
const newName = prompt("Enter the new name for the game:");
  • Input, this is an example of Input as users can enter values and this is sent to the server to then be used.

Delete: Users could delete games, ensuring data security and privacy by enforcing authentication checks. To ensure smooth functionality, backend debugging was done using Postman to test API responses, while frontend debugging utilized browser Inspect tools to track UI interactions.

        let user_name = await getUser();
        if (user_name.toLowerCase() !== name.toLowerCase()) {
            console.log('Logged in user cannot remove another users card')
            return
        }
  • Selection, this is an example of selection as the if statement is a conditional which goes through selection and checks with the logged in user is the same as the usr of the card they are trying to delete.
        def delete(self):
            body = request.get_json()
            pgn = Pgn.query.get(body['id'])
            if not pgn:
                return {'message': 'Pgn not found'}, 404
            pgn.delete()
            return jsonify({"message": "pgn deleted"})
  • Iteration, This code snippet within the algorithm shows iteration, because the code iterates through all of the rows of the rate table systematically and searches for games with user_ids which match with that of the request, to then delete it.

Analysis Page Integration:

  • The Stockfish Analysis was integrated into the Game Manager to provide real-time feedback on move quality. This required: Using iteration to continuously evaluate positions after each move. Storing evaluation data in collections (lists) for quick access and visualization. Ensuring a smooth end-to-end tracing process between frontend and backend using HTTP methods (GET, POST) for seamless data exchange. Deployment with Amazon S3 & Docker-Compose The project was deployed using Docker-Compose, which allowed for efficient environment configuration and an automated update cycle.

Deployment CI/CD Pipelines: Deployment workflows using commands like docker-compose down, docker-compose build, and docker-compose up -d ensured updating the deployment after local commits effectively. Security and Authentication: Used certbot to get HTTPS on webste and JWT authentication within webstie to verify user access before allowing modifications to various features JWT-based authentication was used to verify users before allowing access to game data. Selection statements (if-else checks) ensured only authorized users could edit or delete manager tab, skills tab and various otehr. Program segmentation was implemented to separate user authentication logic from gameplay functionality, improving maintainability.

Big Ideas

BI 1.4 (Debugging): Debugging Stockfish API Integration:

  • Ensured proper communication between frontend and backend by resolving issues with API responses and parsing, had to make a converter to shift between various chess formats.
  • Identified and fixed analysis API where the engine would return unexpected or invalid evaluation with proper conditional checking. Fixing Deployment Issues:
  • Resolved CORS errors by updating Nginx configuration and ensuring proper request handling.
  • Addressed database initialization failures that prevented proper game state storage.
  • Debugged server-side API failures caused by outdated pythonURI and misconfigured fetch functions. BI 2 (Data)- Game State Management:
  • Developed a database schema to store user-specific game history, moves, and evaluations.
  • Implemented CRUD operations for users to create, update, and review past games. Stockfish Evaluation Data:
  • Designed API endpoints to fetch move evaluations and best move suggestions from Stockfish.
  • Processed and formatted evaluation scores to make them user-friendly (e.g., centipawn advantage, mate threats). Data Persistence and Retrieval:
  • Optimized database queries for retrieving and storing large amounts of move data efficiently.
  • Ensured data integrity by handling concurrency issues when multiple users accessed game history simultaneously. BI 4 (Deployment) Server Setup & Hosting: Managed environment variables to ensure secure and scalable deployment. Handling Production Issues:
  • Resolved an outdated Nginx issue that caused CORS errors preventing API communication.
  • Debugged database initialization failures that blocked game data from being created correctly.

N@TM Event Review

Took Interest In: Period 1 Project (InterTravel)

  • Project Overview:
    • A travel website that allows users to search for flights, hotels, and activities based on their preferences and budget.
    • Users can create an account, save their favorite hotels, and give ratings as well.
    • The website also offers a maps section with pinpoints on a map with various guides.
    • One feature I thought was interesting was the ability for the user to create a custom packing list based on their travel plans.
  • Also saw the Ansh Kumar’s website (ClubHub) and liked the very simple interface which was aesthetic, clean and simple to use and got some potential ideas for our website in the future.

Our Project Feedback:

  • It was really fun
  • Very clean looking with nice features
  • i liked how you guys incorporated stockfish chess engine into your website and the user experience was really simple and easy to use!
  • This website had lots of impressive features and the pictures of the chess game after playing were a great touch to the website. I honestly had no constructive criticism as the website was very well made.
  • I loved the chess feature and how you had too lose to play it
  • The pawns website can help the user gain a better experience when playing chess such as it can rate each movement.
  • Show something other than the chess feature.
  • Amazing website and helps people with chess
  • It was great, I rlly liked how well designed this site was
  • The chess analyzer looked really cool. As a chess player being able to analyze your moves, skill rating, ranking, and power bot all helps me to improve my chess skill. Each moves shows highlighted in yellow box made me happy because it was cool. i think better css styling would be great
  • Add an edit feature for chess moves. Very cool idea to download a file and analyze moves based off of a png file!
  • UI is a bit buggy and also the ELO selection could be a more elegant UI
  • Loved your games and features.
  • Very nice UI, I like your features they make a lot of sense! You mentioned there wasn’t token required so maybe consider adding that?
  • The website’s functionality is really cool. I like how I can choose the elo level and review my moves and analyze them. I don’t know if you had this, but it would be cool if when I analyze my moves, it gives me a rating on how I did and if it was a good or bad move
  • Great project overall, I‘m sure it takes a lot time and effort to code an actual chess bot. I also like how all the moves get recorded and how there is a leaderboard. The only thing I was wondering about was whether or not the bot is programmed to play strategically to play the smartest moves, or if - it simply does random moves. Other than that, great job!
  • awesome
  • Explain a bit more than just the fact that you can move the pieces around.
  • nice site
  • i liked how you guys incorporated stockfish chess engine into your website and how the user experience is very simple and easy to to use and navigate. one thing u would improve is making the website have a more consistent theme.
  • It was really good and it was interesting to learn about chess
  • I would have liked more color in the website but liked the functionality and explanation of how the website works

Takeaways

  • Looks like our presentation can be improved a bit more to make it more consistent across groups, as for some groups we mainly focused on the game page as it was the most flashy and interesting intially. We could be more consistent with showing the analysis and other types of features.
  • Seems like UI was also something that came up, some better UI testing and making a cleaner more cohesive webpage would also go along way.
  • Expanding upon the analysis feature could also be a new implementation in the future, and expanding upon the analysis API and displying it with a simpler analysis page UI.
  • Add more explanation for game function on the game and analysis as some users seemed a bit confused.

Summary:

  • 5 Things Over 12 weeks: 4.6/5, I made meaningful contributions as a scrum master towards planning the objectives and outlining for each team member, and reminding them through our communication channels on slack. Moreover, I helped them with their own features as they faced any difficulties, and spent hours helping them in some scenarios if required. Personally, I made numerous core features for our website that drive the main system and enable the other features to have purpose (such as the various stockfish implementations I made). I think in terms of the amount of work and meaningfulness of that work over the five weeks I think I exceeded expectations on an individual level. (see five thigns above)
  • Full Stack Project Demo: 1.8/2, our feedback from N@TM seemed very positive while of course their are always improvements I think that the major suggestions to us were about some styling and some few notes or informational things we could add to make the website seem more user friendly. (See fedback below)
  • Project Feature Blog: 0.9/1, Detailed explanation of a key feature using CPT/FRQ language with clear descriptions and images.
  • MCQ: 0.9/1 completed MCQ on time and have complete evaluation below all while improve upon my score of last time (networking, security, etc.), to get a score of 59/67 - the few mistakes were due to poor reading of the question and various other issues. (see mcq review below)
  • Total: 0.9 average or 9/10

Honest Self Grade:

  • Technical Skills: I think this was definetly a strong point in terms of creating my own CRUD features or other features effectively, while sometimes I strayed from the purpose I was able to create pretty good code and help my teamates with their own features as well. Moreover towards the end we were able to focus back on the user and create a cohesive app and review for our night at the museum. However, I think the main improvement in this domain could come from trying new technologies and simply expanding developement horizons, and focusing more on code conventions like those defined in PEP 8.
  • Role Objectives (scrum master):
    • Collaboration: In terms of collaboration while our team had effective communication channels outside of school with various slack groups and assigned meetup times for big checks, sometimes in class we all did our own thing and didn’t collaborate as much as possible to make the best possible product. As scrum master I should have attempted to facilitate this communication more which could have potentially lead to more interconnected features earlier on.
    • Agile Frame Work: In terms of planning sometimes one teamate had to do a part of a project but instead of breaking it into chunks the whole piece went to them. Better implementation of the agile methodology would help with task assignment and sprint effectiveness.
  • Presentation skills: Started strong at the beginning of the trimester but then focused too much on simply making the review and not focus on how the listener would see the information and making it accesible for them. However, picked it up again at the end of the trimester with more planned out reviews and better terminology.

Improvements:

  • Having better documented code with clear comments, and adhering to better programming standards.
  • Utilizing pre-exisintg system in some scenarios tried to go around the pre-existing system to make a feature faster, but always hurt more than it helped in long run.
  • Utilize more modular approach, we had numerous single endpoints that could have been grouped together into a seperate API file but we left it in the main.py file instead which lead to a chaotic and not organized developer experience (DX)
  • Some tasks took longer than expected (e.g., deployment setup). Estimating effort more accurately in the future can help maintain sprint effectiveness.
  • Ensuring API interactions and dependencies are planned out earlier in the sprint can prevent late-stage integration issues
  • Breaking large features into smaller, more manageable components will improve efficiency and debugging, in terms of collaboration sometimes one teamate had to do a part of a project but instead of breaking it into chunks the whole piece went to them.

Future Features:

  • Create Backend UI on the stu.pawnsy website, as having a the potential for DELETE functions client-side creates security risks and having a Backend UI For admin’s is far better for security purposes.
  • Create admin specific functionality for the manager page to clear games with negative titles.
  • Create new functionality for tournamnets and more collaborative features that enable in time user vs user games or live game play across multiple users and focus more on user-user interation rather than user-bot interactions.

Technical skills:

  • Implementing Stockfish with JavaScript chess libraries deepened your understanding of both frontend developement and utlizing APIs for featuer development.
  • Creating CRUD features with the Stockfish engine and making the user based system in the manager manged refined ability to work with databases and think from a user first perspective.
  • Building the Game Manager reinforced my ability to work with CRUD operations, ensuring smooth data handling and user interactions.
  • Integrating Stockfish analysis with the evaluation page strengthened my knowledge of API interactions and UI feedback loops.

Deployment:

  • Working on the initial deployment introduced me to the difficulties of deploying and building a scalable app, I was introduced to what a large scale application deployment could look like and taught me applicable skills.
  • Working on the final deployment taught me the importance of having good programming practices from the beginning and have well documented code for easy debugging and fixing later.

Natm interest

  • Taking extreme interests in other projects and people, ie N@tM reviews, chronicle event/interests, personalization
  • Action: See above N@TM blog and interest in InterTravel and Clubhub.

Fuure steps

  • Taking advanced courses in ML, AI, and data science, including deep learning, reinforcement learning, and probabilistic modeling.
  • Gaining hands-on experience with ML frameworks (TensorFlow, PyTorch) and quant tools (NumPy, Pandas, MATLAB, QuantLib, etc.).
  • Exploring internships in ML/AI research, finance, or domain specific science field to apply theoretical knowledge in a professional setting.
  • Contributing to open-source projects related to artificial intellgience or software engineering in fields I’m interesting in like computational biology, drug design, etc.

Project Reflection: Next Steps & Evaluation

  • One of the biggest strengths of our project was the robust backend and API integration. Implementing the Stockfish engine, CRUD-based game management, and user authentication added strong functionality to the chess platform. Additionally, the scalability and deployment of the project using Docker-Compose and Amazon S3 made the system more extendable for future improvements. I’m also proud of how the Stockfish analysis feature turned out, as it added a valuable layer of insight for users looking to improve their gameplay.

  • However, there are definitely areas I’d like to improve. The UI/UX experience could have been smoother, and enhancing the game interaction would make the platform more engaging. Another key area for improvement is database optimization—as more users interact with the system, I need to ensure efficient queries and indexing to maintain performance. While I used Postman for debugging, expanding automated testing coverage to include unit and integration tests (e.g., Jest, PyTest) would increase system reliability and catch potential issues earlier.

Moving forward, I would like to:

  • Implement a more advanced Stockfish analysis mode, allowing for multi-line evaluations and deeper insights.
  • Introduce real-time WebSocket communication for multiplayer or live game tracking.
  • Improve security features through better deployment methods.
  • Expand automation to streamline future updates and deployments.

Individual Reflection: Strengths & Areas for Growth

  • Throughout this project, I played a key role in developing and integrating technical features, which reinforced my strength in full-stack development. I was able to effectively debug and test my work, using Postman, browser Inspect tools, and end-to-end tracing to ensure smooth frontend-backend communication. Additionally, I took the initiative to set up deployment before the role shifted to Vasanth, which helped me gain experience with Docker-Compose and cloud-based storage solutions.

  • Codebase Documentation: While I was focused on getting the features to work, I could have done a better job maintaining clear documentation for future scalability. Moving forward, I plan to use Sphinx (for Python), JSDoc (for JavaScript), and structured README files to make my work more accessible to others.
  • Project & Code Management: I could improve my Agile workflow, breaking tasks into smaller milestones and improving sprint estimation. I also want to refine how I use tools like Jira or Trello to keep track of progress.
  • Team Collaboration & Communication: While I contributed significantly on the technical side, I recognize the importance of fostering stronger collaboration among teammates. Encouraging peer code reviews, better communication, and more structured stand-up meetings would help the team work more cohesively.
  • Agile Development & Sprint Planning: I need to get better at structuring development cycles and iterating more effectively based on retrospective analysis.
  • While I implemented the necessary API routes and user authentication in Flask, I could improve how I structure my Flask applications by following better blueprint-based modularization.
  • But I want to improve my overall testing workflow by integrating unit testing for Flask routes (PyTest/Unittest), our better end to end testing with something like selenium.
  • More advanced databases (like redis) which enables optimized queries and structuring the database schema for faster lookups and reduced latency will be crucial for handling larger-scale applications in the future.

Chat with other student: Kanhay Patil

  • Chatted with Kanhay Patil about organizing materials for finals, he gave me feedback on my live review as well. And I gave him feedback on what he can improve for his blog and live review in the utterances of his blog.