For this fortnight we have started learning about algorithms, pseudo-code and Python conditionals. Thankfully for me, because of my previous experience with coding I was quite comfortable, although I believe there is always room to improve.
To assist in this process weāve been given the parameters of a ātic tac toeā game, where we have to program an agent to achieve a goal (win, lose or some other outcome). To help us understand some of the context we also set about defining the terms of agent:
For the tic tac toe game, I partnered with Myrna and together we hypothesized some game winning strategies, although there are many edge cases still, we predicted that the starting player had a significant advantage. We still didnāt resolve a definitive strategy, but we did recognize how crucial corners are for winning. Below are some images from our games:
What would I do differently?
This process really taught me the importance of āplanningā out your code. Even as someone with some experience, I have sometimes just tried to approach problems with a āsolve on the goā method. It has been good to reinforce the planning and modular approach for future coding projects and assignments.
Other Lessons
The session with guest lecturer Dr Nina Terrey was hugely beneficial for the way I was thinking about both the build and my maker project. This quote in particular stood out for me:
"Resist problem fixation and solution determination"Ā
Updates 27/03/21
I managed to balance the ratio of losses to wins a bit more for the homework, but really ran out of time to implement a mostly winning agent.
My strategy was to convert the board to a list array so i could more easily add my piece at certain indexes. The "stringifyā function was one that I referenced and modified from the Geeks for Geeks website, essentially, once I had added my piece in the list, the āstringifyā function would convert the list back to a string which could then be passed into the game engine.
Iām not really happy still with this, I think there could be a cleaner way to handle the cases where the middle piece isnāt mine. I think once weāre on semester break Iāll wrap my head around it again.
My hopes for the A-week activity was to have at least a completed circuit within aĀ ācoolā design of some kind. I have never done sewing before, and the last time I did any circuit work was in about 2016. With the help of the cohort and the teachers i was able to produce a skull design with an LED eye.
Fortnight 1
What did we learn?
Although I have a some software development experience, I still felt anxious about learning Python as I hadnāt used it for about a year. Additionally, the Python and general programming that Iāve had experience with hasnāt been used to (directly) interface with Cyber Physical Systems before.
While I was comfortable with the visual code editor environment, the command line interface and Python itself, Johan taught me about the āCondaā environments, and how theyāre a simpler way to manage virtual environments. Additionally, the spatial and image output component of the build was new for me. I had assistance from James with the geometry mathematics to understand the process, while Myrna also provided me with a system that was simplified to understand the visual output process.
While I was assisting some other cohort members with their coding, I was also shown by Mena a simpler process to access nested objects within an array. Overall, even though Iāve had previous experience coding, I found it helpful to be transparent and ask for assistance when I need it, share ideas and concepts with the cohort and learned about some Python tips and techniques.
What would I do differently?
I was surprised by the due date and the due time. I didnāt realize it was due at 13:00 on the same day, as I assumed that it was going to be 23:59. In the future, Iām going to always refer back to the assignment details and or check the calendar rather than assume anything.Ā
In terms of the content, I think I will switch to Conda for any future Python projects, and double check that the method Iāve used to solve a problem isnāt too convoluted.