# data[].attributes.headline
An Experiment to Assess Students’ Engagement in a Gamified Social Learning Environment

# data[].attributes.subject
An Experiment to Assess Students’ Engagement in a Gamified Social Learning Environment

# data[].attributes.body
Authors: Jorge Simoes, Sergio Mateus, Rebeca P. Diaz Redondo, Ana Fernandez Vilas
License:  Creative Commons Attribution-Noncommercial-NoDerivativeWorks 3.0 Unported
Publication year: 2015

# data[].attributes.headline
Fundamentals of Cloud Computing and Cybersecurity

# data[].attributes.subject
Fundamentals of Cloud Computing and Cybersecurity

# data[].attributes.body
Creator: Claude Sam-Foh
License: OCL 1.0
Publication year: 2022

# data[].attributes.attachment_link.title
Item Details – Open Library – eCampusOntario

# data[].attributes.attachment_link.description
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

# data[].attributes.headline
Inclusive and Experiential Pedagogies for Undergraduate Mathematics and Computer Science

# data[].attributes.subject
Inclusive and Experiential Pedagogies for Undergraduate Mathematics and Computer Science

# data[].attributes.body
Creators: Robyn Ruttenberg-Rozen, Andrew DiVito, Ami Mamolo, Miroslav Lovric, Jeremy Bradbury and Katelin Hynes
License: CC-BY-NC-SA
Publication year: 2023

# data[].attributes.attachment_link.authors[].name
Robyn Ruttenberg-Rozen, Andrew DiVito, Ami Mamolo, Miroslav Lovric, Jeremy Bradbury and Katelin Hynes

# data[].attributes.attachment_link.title
Inclusive and Experiential Pedagogies for Undergraduate Mathematics and Computer Science

# data[].attributes.attachment_link.description
Robyn Ruttenberg-Rozen, Andrew DiVito, Ami Mamolo, Miroslav Lovric, Jeremy Bradbury and Katelin Hynes

# data[].attributes.headline
Interactive Notebooks on Software Design

# data[].attributes.subject
Interactive Notebooks on Software Design

# data[].attributes.body
Creator: Emil Sekerinski
License: CC BY-NC-ND
Publication year: 2022

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.body
Creator: Digital Education Strategies - The Chang School
License: CC BY-SA
Publication year: 2019

# data[].attributes.attachment_link.authors[].name
Digital Education Strategies - The Chang School

# data[].attributes.headline
Designing Quality Tech-Enabled Learning Experiences - A self directed study

# data[].attributes.subject
Designing Quality Tech-Enabled Learning Experiences - A self directed study

# data[].attributes.body
Authors: Angela van Barneveld, Heather Carroll, Sarah Driessens, Pat Maher and Lisa O'Neill
License: CC BY-SA
Publication year: 2022

# data[].attributes.attachment_link.authors[].name
Angela van Barneveld, Heather Carroll, Sarah Driessens, Pat Maher and Lisa O’Neill

# data[].attributes.attachment_link.title
Designing Quality Tech-Enabled Learning Experiences - A self directed study

# data[].attributes.headline
Programming Fundamentals: A Modular Structured Approach, 2nd edition

# data[].attributes.subject
Programming Fundamentals: A Modular Structured Approach, 2nd edition

# data[].attributes.body
Authors: Kenneth Leroy Busbee and Dave Braunschweig
License: CC BY-SA
Publication year: 2018

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.headline
Ethical Use of Technology in Digital Learning Environments: Graduate Student Perspectives, Volume 2

# data[].attributes.subject
Ethical Use of Technology in Digital Learning Environments: Graduate Student Perspectives, Volume 2

# data[].attributes.body
Authors: Barbara Brown, Verena Roberts, Michele Jacobsen, Christie Hurrell, Mia Travers-Hayward, Nicole Neutzling, Joel Templeman, Marcia Steeves, Rob Hendrickson, David Luinstra, Lindsay Humphreys, Lacey Dunham and Michael Maciach
License: CC BY
Publication year: 2021

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.body
Authors: Matthew McGravey, Chris Craig, Craig Vincze, Robin Emond, Jaclyn Wise, Heather Currie, Ali MacDonald, Michelle Splinter, Melissa Gopaul, Diana Danciu, Oliver Pryce, Tammy Gerard, Allison Lennox, Nady Tannir, Namita Patel, Larissa Soos, Darren Bryant, Chris Cameron, Kristen Figliuzzi, Alison Sprayson, Michelle Parrish, Tobie Pilloy, Man Hoi Leung, Sarah Brathwaite, Lauren Luchka, Michael Bowman, Bell Violet Hogan and Kristen Riberdy
License: CC BY-NC-SA
Publication year: 2021

# data[].attributes.attachment_link.title
Item Details – Open Library – eCampusOntario

# data[].attributes.attachment_link.description
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

# data[].attributes.body
Creator: Digital Education Strategies - The Chang School
License: CC BY
Publication year: 2019

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.body
Authors: Xtine Burrough and Michael Mandiber
License: CC BY-NC
Publication year: 2011

# data[].attributes.body
Creator: A.W. (Tony) Bates
License: CC-BY-NC
Publication year: 2019

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.headline
Best Practices in Developing and Teaching with XR Learning Simulations

# data[].attributes.subject
Best Practices in Developing and Teaching with XR Learning Simulations

# data[].attributes.body
Creators: Lisa Trimble, Linda Facchini, Elan Paulson, Evan Sitler and Nancy Nelson
License: OCL-ND 1.0
Publication year: 2022

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.body
Creator: Marshall Asch
License: GNU GPL
Publication year: 2023

# data[].attributes.body
Creator: Marshall Asch
License: GNU GPL
Publication year: 2023

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.body
Creator: Judi McCuaig
License: GNU GPL
Publication year: 2023

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.body
Creators: Judi McCuaig, Nathan Laundry, and Marshall Asch
License: GNU GPL
Publication year: 2023

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.body
Author: Pouria Ramzi
License: CC BY-NC
Publication year: 2023

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.headline
Teaching with Simulation - Play and Learn

# data[].attributes.subject
Teaching with Simulation - Play and Learn

# data[].attributes.body
Authors: Michael Brock, Stephanie Ayres, Christopher Schlachta, Richard Cherry, Peter Wang and Colin McDonald
License: OCL 1.0
Publication year: 2022

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.headline
Professional Web Accessibility Auditing Made Easy: Essential Skills for Web Developers, Content Creators, and Designers

# data[].attributes.subject
Professional Web Accessibility Auditing Made Easy: Essential Skills for Web Developers, Content Creators, and Designers

# data[].attributes.body
Creator: Digital Education Strategies - The Chang School
License: CC BY-SA
Publication year: 2019

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.headline
Thriving in the Age of Artificial Intelligence

# data[].attributes.subject
Thriving in the Age of Artificial Intelligence

# data[].attributes.body
Authors: Mashaal Jawad, Nicholas Varas, Aayush Bajaj, Ellen James, Hemshikha Sultoo, Aaron Emmanuel, Cody Moore, and Dylan White
License: CC BY
Publication year: 2022

# data[].attributes.attachment_link.title
Item Details – Open Library – eCampusOntario

# data[].attributes.attachment_link.description
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

# data[].attributes.headline
Design Concepts for Virtual Reality Games

# data[].attributes.subject
Design Concepts for Virtual Reality Games

# data[].attributes.body
Author: Manan Kaushikbhai Patel
License: OCL 1.0
Publication year: 2022

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.headline
Virtual Reality Introduction Using Unity

# data[].attributes.subject
Virtual Reality Introduction Using Unity

# data[].attributes.body
Creator: Manan Kaushikbhai Patel
License: OCL 1.0
Publication year: 2022

# data[].attributes.attachment_link.title
Item Details – Open Library – eCampusOntario

# data[].attributes.attachment_link.description
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

# data[].attributes.headline
Virtual Reality Graphics With Unity Engine

# data[].attributes.subject
Virtual Reality Graphics With Unity Engine

# data[].attributes.body
Author: Manan Kaushikbhai Patel
License: OCL 1.0
Publication year: 2022

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.headline
Integration of Multimedia in Virtual Reality

# data[].attributes.subject
Integration of Multimedia in Virtual Reality

# data[].attributes.body
Authors: Manan Kaushikbhai Patel and Jeremy Brooks
License: OCL 1.0
Publication year: 2022

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.body
Authors: Jurg Nievergelt and Klaus Hinrichs
License: CC BY
Publication year: 2011

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.headline
Gamification of Higher Education by the Example of Computer Games Course

# data[].attributes.subject
Gamification of Higher Education by the Example of Computer Games Course

# data[].attributes.body
Author: Martin Sillaots
License: Copyright (c) IARIA, 2015
Publication year: 2015

# data[].attributes.attachment_link.description
DataSys 2023 CongressJune 26, 2023 to June 30, 2023 - Nice, Saint-Laurent-du-Var, France

# data[].attributes.body
Creators: Semchuddar Ponnamabalam and David Mohajer
License: CC BY-ND
Publication year: 2022

# data[].attributes.attachment_link.authors[].name
Semchuddar Ponnamabalam and David Mohajer

# data[].attributes.headline
Professional Web Accessibility Auditing Made Easy

# data[].attributes.subject
Professional Web Accessibility Auditing Made Easy

# data[].attributes.body
Creator: Digital Education Strategies - The Chang School
License: CC BY-SA
Publication year: 2018

# data[].attributes.attachment_link.authors[].name
Digital Education Strategies - The Chang School

# data[].attributes.attachment_link.title
Professional Web Accessibility Auditing Made Easy

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.body
Creator: Haru Ji
License: GNU GPL
Publication year: 2022

# data[].attributes.attachment_link.title
Item Details - Open Library - eCampusOntario

# data[].attributes.attachment_link.description
eCampusOntario is a not-for-profit centre of excellence and global leader in the evolution of teaching and learning through technology.

# data[].attributes.body
Creators: Sem Ponnambalam and David Mohajer
License: OCL 1.0
Publication year: 2022

# data[].attributes.attachment_link.title
Cybersecurity Governance : Risk Management

# data[].attributes.headline
Gamification as a tool for enhancing graduate medical education

# data[].attributes.subject
Gamification as a tool for enhancing graduate medical education

# data[].attributes.body
Authors: Christa R Nevin, Andrew O Westfall, J Martin Rodriguez, Donald M Dempsey, Andrea Cherrington, Brita Roy, Mukesh Patel, James H Willig
License: Creative Commons Attribution Non-Commercial
Publication year: 2014

# data[].attributes.attachment_link.readable_text
Abstract

Introduction

The last decade has seen many changes in graduate medical education training in the USA. Among the most prominent, the Accreditation Council for Graduate Medical Education (ACGME) issued guidelines in July 2003, and again in July 2011, that placed restrictions on the number of hours worked by medical residents during their training. Another important change is the arrival of millennial students to graduate medical education settings. This generation of learners has had ubiquitous access to information technology throughout their education. Studies of the educational impact of ACGME work hour guidelines have been inconclusive and questions persist among educators on how to best prepare millennial residents in this new work hour-regulated educational environment. As educators are left to balance the more limited time available between patient care and resident education, new methods to augment traditional graduate medical education are needed to best prepare residents within the new ACGME-mandated environment.

Gamification is the use of elements of game design to increase user engagement. Gamification has been successfully incorporated into medical and scientific endeavours in recent years, from health/fitness and patient education applications, to genome comparisons (Phylo), protein structure prediction (Foldit) and malaria parasite quantification. Due to its proven ability to improve motivation, participation and time investment across multiple settings, we incorporated elements of gamification into the design of software that allowed our residents to participate in a medical knowledge competition with their peers in order to encourage extracurricular learning. We used the conceptual frameworks of user-centred design and situational relevance to achieve meaningful gamification, including connecting with users in multiple ways and aligning our 'game' with our residents' backgrounds and interests in furthering their education. The purpose of this study was to assess acceptance and use of a novel gamification-based medical knowledge software designed to supplement traditional graduate medical education among internal medicine (IM) residents and to determine retention of information on subsequent retest.

Methods

Setting

Our study was conducted at two IM training programmes in the USA: the Tinsley Harrison Internal Medicine residency programme at the University of Alabama at Birmingham (UAB) and the University of Alabama at Huntsville (UAH) programme. Inpatient rotations in both general medicine and subspecialties are completed at tertiary care centres, and teams consist of attending physicians, residents (postgraduate year 1 (PGY1)-postgraduate year 3 (PGY3) and medical students. All residents currently completing their IM training (n=128 at UAB and n=24 at UAH) were invited to participate via email or announcements at programme conferences.

Gamification and software design

We named our software Kaizen-Internal Medicine (Kaizen-IM). Kaizen, a Japanese word from the quality improvement literature, signifies the need for continuous daily advancement, a concept analogous to the principle of lifelong learning we seek to inculcate in our residents. Gamification elements included in Kaizen-IM included (1) voluntary participation; (2) explicit, consistent, software-enforced rules of competition for all participants; (3) immediate feedback (response correct or incorrect, followed by explanation of key concepts); (4) team participation with trainees divided into groups as well as individual participation and (5) participants could increase in rank or level (badges granted for score milestones or other achievements). Kaizen-IM could be accessed via the UAB residency website or a link provided in weekly emails after January 2013. Upon registration, participants could input a unique username for display on the leaderboard so that they could remain anonymous. Additionally, they identified their trainee level (PGY1-3).

Questions and competition

Our Kaizen-IM season lasted throughout the 2012-2013 academic year and was divided into three rounds (rounds 1-3). Each round included general IM questions and questions from three medical subspecialties. Questions were written by faculty and emphasised clarity, brevity and were followed by a concise explanation of the correct response ( figure 1). Questions were published at 00:01 daily, there was no time limit for response and unanswered questions remained to be addressed at the trainee's convenience. Participants could review prior questions/answers and earned badges at any time. Residents competed with one another as individuals and were also divided into six predetermined teams based on faculty advisor for team competition.

Rounds

Round 1 (20 August 2012-13 October 2012): included IM, rheumatology, infectious diseases and pulmonary medicine. A total of 107 questions were delivered at a rate of approximately two per day. Only UAB trainees participated in round 1.

Round 2 (14 January 2013-26 February 2013): included IM, cardiology, gastroenterology and haematology-oncology. At a rate of approximately two per day, 84 questions were delivered. UAH residents were invited to join the competition in round 2.

Round 3 (2 April 2013-13 May 2013): included IM, nephrology, neurology and endocrinology. At a rate of roughly three per day, 117 questions were delivered to UAB and UAH residents. Two questions were new and one was a prior question from either round 1 or 2.

Upon logging into Kaizen-IM, participants viewed a dynamically adjusted leaderboard showing contestants with scores just above (within reach) and immediately below (close enough to pass) their own. Five points were awarded for each correct answer. Extra points and badges were awarded for consistency or daily completion of questions for predetermined intervals (marathons) and for achieving benchmarks of consecutive correct responses (hotstreaks). Scores determined progression through 13 ranks, each accompanied by a new level badge awarded at roughly 100-point increments. Weekly 'status of competition' email notifications were sent to highlight how individuals and teams were faring, seeking to remind and motivate participation. At the end of the academic year, following three rounds of competition, the team with the most cumulative points had their names engraved on a plaque.

Data

Participant-level and question-level data were recorded automatically when Kaizen-IM was used. Participant data included player identification, trainee level (PGY 1-3) and team. Question data included date/time, device used (smartphone, laptop and other devices), badges earned and response accuracy. 'Play styles' were characterised based on the number of questions answered: daily (answered questions within 1-2 days), catch-up (completed 2-6 days of questions) and binge (answered >7 days of questions).

Statistical analyses

Analyses focused on acceptance, use, determination of factors associated with loss of players (attrition) and retention of knowledge. Because traditional tests of normality such as the Kolmogorov-Smirnov test, the Anderson-Darling test and the Shapiro-Wilk test are subject to low power, particularly when the sample size is small, continuous outcome measures were graphically assessed for normality by investigating the distributional form of the outcomes using histograms. When normality assumptions were not met, the appropriate rank-based Wilcoxon test was used.

Acceptance

We invited residents at UAB who had participated (ie, answered ≥1 question) to take part in four focus groups at the conclusion of round 1. Focus groups were conducted in November-December 2012. Each group was limited to no more than eight residents and a $35 gift certificate was given as a participation incentive. Focus groups were audio recorded and transcribed verbatim. Common themes were then coded by two independent reviewers (CRN and JHW or AC) using a combined deductive/inductive approach.

Use

Medians and the corresponding IQR, 25th to 75th centile, were used to detail Kaizen-IM software use per round (1-3) and trainee level (PGY1-3). Because utilisation data were counts, Poisson regression models were used to test for differences in use by trainee level for each round. A Bonferroni correction was applied to control the overall type 1 error rate across the 27 individual Poisson regression models. p Values <0.05/27=0.002 were considered statistically significant.

Notification effect: In order to assess the impact of weekly 'status of the competition' emails, we analysed the differences in the total number of questions completed and the number of users participating the day before and the day of week 'status of the competition' emails. These continuous outcome measures (number of questions completed and number of users) were graphically assessed for normality by investigating the distributional form of the outcomes using histograms. Because normality assumptions were not met using this method, Wilcoxon signed-rank tests were used.

Badge effect: In order to test whether earning badges led to greater use of Kaizen-IM, after a specific number of questions had been released in each round, we categorised participants into those who had earned a badge and those who had not earned a badge and then quantified the proportion of remaining questions completed in the round. Differences in the number of questions answered between those who had earned a badge and those who had not were graphically assessed for normality by investigating the distributional form of the outcome using histograms. Because normality assumptions were not met using this method, two-sided Wilcoxon rank-sum tests were used to analyse these differences. In addition, we calculated the Hodges-Lehmann estimate of the difference and associated CI between those who earned a badge and those who did not.

Attrition

Two analyses of factors associated with loss of players or attrition were performed: attrition per debut round and longitudinal attrition.

Attrition per debut round: This analysis included debut players from round 1 (UAB) and round 2 (UAB, UAH) and assessed whether or not they participated in the Kaizen-IM round subsequent to their debut (ie, round 2 if they debuted in round 1 or round 3 if they debuted in round 2). Univariate and multivariable logistic regression models were fit to determine factors associated with player loss after one round of play. Variables included in the multivariable model include player class, debut round, predominant play style, per cent of correct answers and per cent of questions completed.

Longitudinal attrition: Using only players who debuted in round 1, a three-level measure to evaluate overall player attrition was created based on the number of rounds completed after the debut round, zero, one or two. Univariate and multivariable ordinal logistic regression models were fit to determine factors associated with longitudinal attrition.

Retention of knowledge

To test retention of knowledge, one prior question (from rounds 1 or 2) was added to the two new daily questions in round 3. For each player, we computed the per cent of correct answers the first (during round 1 or 2) and second time (during round 3) the questions were encountered. Assumptions of normality were met based on histograms assessing the distributional form of the outcome and paired t tests were used to test for differences in the first and second responses overall. We also tested for differences stratified by trainee level (PGY1-3) and by the round during which the question was initially answered (round 1 or 2). A Bonferroni correction was applied to control the overall type 1 error rate across the 12 individual paired t tests. p Values <0.05/12 = 0.004 were considered statistically significant.

All analyses were completed using SAS software V.9.3.

Results

Acceptance

Seventeen residents who participated in round 1 took part in four focus groups. Among the features singled out as enjoyable about Kaizen-IM, they noted, 'Concise, clinically-relevant questions that could be answered quickly during resident down time' and 'a mixture of text-based and image-based... and of easy and more challenging questions'. Residents also reported receiving immediate feedback on their responses ('why a given answer was correct') aided learning. Residents enjoyed the abilities to review previously answered questions, choose anonymous names to be displayed on the leaderboard and answer questions at a date of their convenience.

The single most important motivator for participation identified was the leaderboard. Residents enjoyed the opportunity to compete with their peers as both individuals and teams. While none reported that competition alone was de-motivating, those that found themselves or their teams towards the bottom of the leaderboard reported a loss of motivation as the competition progressed. Residents reported that earning new rank/level badges was less motivating than the leaderboard. Several noted initial excitement at earning badges, but lost interest over time. Reasons for this included lack of understanding of what was required to earn badges and how much progress had been made towards earning a badge.

The primary difficulty reported and a common cause for declining participation by round 1 players was Kaizen-IM accessibility. At the onset of round 1, residents received an email including the link to the Kaizen-IM website and a link was posted on the UAB residency website for easy accessibility. Many individuals reported they did not visit the residency website regularly necessitating repeated searches of email inboxes which discouraged participation.

Use

The number of participants declined in each successive round with 92 participants in round 1, 90 in round 2 and 55 in round 3 that delivered 107, 84 and 117 questions, respectively. Participants answered 16 427 questions throughout the season. The percentage of questions completed (questions answered/total players × total questions) was 71 in round 1 (6985/9844), 69 in round 2 (5180/7560) and 66 in round 3 (4262/6435).

Table 1 details use of Kaizen-IM by round (1-3) for each PGY level (1-3) and includes p values from Poisson regression models modelling the count by the trainee level. In round 1, there were statistically significant differences in the number of days between sessions with PGY1 accessing Kaizen-IM most frequently, median (IQR) of 2.2 days (1.5 to 3.8), and PGY3 residents performing best, median (IQR) of 78.7% correct (73.8 to 86). Across rounds, 28.8% of questions were done on Saturdays and Sundays while 53.1% were completed between 17:00 and 08:00.

Notification effect: Wilcoxon signed-rank tests showed statistically significant increases in total questions answered for rounds 1 and 2 and number of participants for rounds 1 and 3, when comparing totals for days before and days when weekly 'status of competition' emails were sent ( figure 2).

Badge effect: Wilcoxon rank-sum tests evaluated differences in the proportion of questions completed after earning a badge at a prespecified point in each round. In round 1, after 25 questions, there was no statistically significant difference in the proportion of subsequent questions completed for those who had earned at least one badge (n=38; median (IQR) of 98.2 (51.2 to 100.0)) versus those who had not earned at least one badge (n=40, median (IQR) of 90.9 (51.2 to 100.0), p=0.36, Hodges-Lehmann estimate of shift=0.0 (0.0 to 7.3)). In round 2, after 25 questions, those who had earned badges (n=12, median (IQR) of 100.0 (100.0 to 100.0)) compared with those who had not (n=64, median (IQR) of 77.1 (32.2 to 100.0)) were found to be more likely to answer a greater proportion of remaining questions (p=0.02, Hodges-Lehmann estimate of shift=5.9 (0.0 to 39.0)). In round 3, after 35 questions, there was no statistically significant difference in the proportion of remaining questions completed (p=0.15, Hodges-Lehmann estimate of shift=0.0 (0.0 to 25.6)) between those who had (n=19, median (IQR) of 100.0 (89.0 to 100.0)) and had not (n=22, median (IQR) of 100.0 (34.1 to 100.0)) earned badges.

Attrition (player loss)

Attrition per debut round: 33% of players did not participate in the round following their debut. In logistic regression models for factors associated with participant loss, we found for every 10% increase in questions completed the odds of attrition decreased (0.81; 0.69 to 0.95). UAB participants who skipped round 1 and debuted in round 2 were at high risk for stopping play (12.69; 1.34 to 120.15) ( table 2).

Longitudinal attrition: Analysis of player attrition throughout the season (only UAB players who debuted in round 1) showed a loss of 29% (n=27) after round 1 and 28% (n=26) after round 2. In ordinal logistic regression analysis, completing more questions (0.80 per 10% increase; 0.70 to 0.93) was associated with lower likelihood of attrition. PGY3 versus PGY1 class (4.25; 1.44 to 12.55) and non-daily play (4.51; 1.50 to 13.58) were associated with increased odds of player loss. The proportional odds assumption was met for all ordinal models.

Retention of knowledge

Overall, 50 participants answered ≥1 retention question both times it was presented for a total of 1046 paired responses.

On average, players' answers were correct 11.9% (p<0.001) more frequently when a question was reintroduced. Benefits were seen for both reintroduced round 1 questions (10.2% increase, p=<0.001) and round 2 questions (17.4% increase, p<0.001) ( table 3).

Discussion

In a time of work hour restrictions where resident hospital presence is strictly regulated, we sought to capitalise on the technological savvy of millennial learners with a new approach to supplement traditional medical instruction. We developed web-based medical knowledge competition software (Kaizen-IM) and incorporated gamification strategies into our design in an effort to encourage resident participation. Each of the 16 427 questions completed and the ensuing explanation of the key point represented additional teaching interactions that otherwise would not have occurred in the academic year. With over a quarter of questions answered on weekends and over half between 17:00 and 08:00, it is clear we were able to engage residents outside of typical programme didactics. We found both qualitative and quantitative evidence of a beneficial effect of gamification strategies on Kaizen-IM use. Taken together, these data suggest that our gamification-based educational software effectively engaged residents, similar to the effects of gamification observed in other settings. In addition, analyses of Kaizen-IM data provided insights into modifiable factors associated with learner attrition and retention of knowledge that may serve to further enhance the educational benefits of this strategy for our trainees.

While gamification has been used in educational settings, reports of its integration and effect in medical education settings are limited. In focus groups, residents highlighted the leaderboard as highly motivational, and the ability to compete as both individuals and teams allowed Kaizen-IM to appeal to a greater number of users. Of note, displaying each participant's team affiliation on the leaderboard may have led to increased investment through promoting accountability between team members. We saw an effect of earning badges and of our weekly 'status of competition' notification emails on use. While those who had earned badges at the time of analyses completed greater numbers of questions, a statistically significant difference was only seen in round 2. Weekly 'status of competition' notifications were associated with statistically significant increases or trends towards both an increased number of questions completed and competitors playing the day after each communiqué. This suggests that regular notifications have value in enhancing participant retention in software-based educational initiatives, though further research is needed to delineate the most effective time interval for contacting trainees.

We designed our analyses of Kaizen-IM data using insights derived from observing the highly competitive 'Free to play' (F2P) software space. F2P games are ubiquitous and allow users access to software at no cost, while developers meticulously analyse player data for insights on how to increase user acquisition and engagement. User data are then used to tweak software parameters to further engage users and maximise playing time. Analysis of Kaizen-IM data can be viewed in a similar light as it provides insight into how to initially and longitudinally engage residents to encourage repeated investments of time-answering questions. The data captured through the use of technology-driven learning approaches such as Kaizen-IM coupled with ongoing analyses represent new opportunities for educators to monitor and assess learner engagement and performance. Strategies such as Kaizen-IM will be able to supplement resident assessment beyond the current periodic evaluations offered by yearly in-service and eventually board certification examinations. In the future, such approaches may provide an early indication of specific educational needs in focused subject areas, allowing timely targeted learning that will benefit residents. We posit that an ongoing technology-based strategy to identify deficiencies and provide ongoing targeted supplementary education may ultimately lead to better-trained providers able to achieve improved evidence-based care and outcomes for their patients.

The statistically significant increases in correct responses upon question retesting suggest participant knowledge retention. Consistent with previous reports of decreased information recall over time in healthcare education settings (decay of knowledge), overall improvement in scores was higher for more recent (round 2; 17.4%) versus older questions (round 1; 10.2%). Resident-level comparisons generally found less statistically significant improvements in the PGY3 than other classes. This may be due to sample size, but other hypotheses such as PGY3 having decreased engagement due to competing priorities (associated with the proximity of graduation and preparation for next steps) or greater Kaizen-IM effectiveness earlier in training must be considered. Further exploration of factors affecting retention of knowledge in technology-driven educational initiatives will lead to recognition of how best and often to deploy content to maximise long-term recall of information among our technology-savvy millennial learners.

The limitations of our study include the restriction of analyses to two residency sites both in the southeastern USA and encompassing a single medical specialty (IM). However, our software is a platform where educational content delivered to residents can be changed to accommodate other graduate medical education disciplines that are in the process of adapting to new work hour requirements. Residents participated in Kaizen-IM voluntarily and thus our sample size was limited only to those residents that chose to participate. Additionally, our data encompass only one academic year of Kaizen-IM use. It is possible that a larger sample size of participants and/or a longer period of data collection could affect results. While it is certainly possible we have failed to identify effects that really exist (type II errors), we feel we have shown that residents are not only open to supplemental educational tools such as Kaizen-IM but that they do use them and retain some of the knowledge. In assessing use of Kaizen-IM, we were able to identify the impact of weekly 'status of the competition' emails on participation but we cannot account for the impact of internal communications among team members. Finally, regarding analyses of player attrition and retention of knowledge, we can only describe associations between variables and cannot denote causality. Our study adds to the literature by reporting on a novel gamification-based, software-driven instructional strategy and identifies methods by which to analyse and interpret participant data in order to glean insight into how to maximise learning with such techniques. Additional studies are needed to better understand the impact of Kaizen-IM on more objective educational measures such as board exam scores. Further study into the incorporation of elements of other conceptual models beyond user-centred design, situational relevance and motivation models is also needed to best determine how to enhance learning through gamification-based interventions.

Conclusion

Our Kaizen-IM software successfully incorporated elements of gamification and engaged a large number of residents in a medical knowledge competition facilitating acquisition of new knowledge, often outside of regular work/teaching hours. Such educational software platforms, potentially coupled with a metrics-driven approach to analysing resident utilisation data, can be used to deliver and reinforce critical concepts while providing educators with new tools to augment traditional medical education. Such innovations may aid in the education of medical residents whose in-hospital hours are more limited than those of prior generations and support the continued training of the highest quality healthcare providers.

With resident work hour regulations restricting time in training hospitals in the USA, new educational approaches are needed to supplement traditional medical instruction.

We used principles of gamification (the use of game design principles to increase engagement) to design internet accessible educational software (Kaizen-IM) engaging residents in medical knowledge competition.

With over a quarter of questions answered on weekends and half between (17:00 and 08:00) we were able to engage residents outside program didactics, found both qualitative and quantitative evidence of a beneficial effect of gamification strategies on use and found statistically significant increases in knowledge retention over time.

Such educational software platforms, coupled with metrics driven approaches to analysing resident utilisation data provide new tools to deliver, reinforce and augment traditional medical education.

Do gamification-based educational interventions designed to supplement traditional medical education improve in-service and/or board examination scores when used?

What level of participation in gamification-based education interventions is required to improve in-service and/or board examination scores?

What elements of gamification are most effective in encouraging long-term use of gamification-based educational interventions by medical residents?

Eckleberry-Hunt J, Tucciarone J. The challenges and opportunities of teaching "Generation Y". J Grad Med Educ 2011;3:458-61.

Nevin CR, Cherrington A, Roy B, et al. A qualitative assessment of internal medicine resident perceptions of graduate medical education following implementation of the 2011 ACGME duty hour standards. BMC Med Educ 2014;14:84.

Schrope M. Solving tough problems with games. Proc Natl Acad Sci USA 2013;110:7104-6.

Lovell N. Your quick guide to metrics. Games brief, 4 Jun 2012. http://www.gamesbrief.com/2012/06/your-quick-guide-to-metrics/ (accessed 29 May 2013).

Mohr NM, Moreno-Walton L, Mills AM, et al; Society for Academic Emergency Medicine A, Generational Issues in Academic Emergency Medicine Task F. Generational influences in academic emergency medicine: teaching and learning, mentoring, and technology ( part I). Acad Emerg Med 2011;18:190-9.

Acknowledgements

The authors would like to thank the UAB Innovation Board; the programme leadership, chief medical residents and all residents from the UAB and UAH programmes for the 2012-2013 academic year for their support and participation. We would like to thank the RISC group for logistical support and the UAB CCTS leadership and personnel for their critical support of software development. We would like to express our gratitude to VisualDx for allowing us to use their image collection in our questions.

References

Author notes

This is an Open Access article distributed under the terms of the Creative Commons Attribution Non-Commercial License ( https://creativecommons.org/licenses/by-nc/3.0/), which permits non-commercial reuse, distribution, and reproduction in any medium, provided the original work is properly cited. For commercial re-use, please contact journals.permissions@oup.com

# data[].attributes.attachment_link.title
Gamification as a tool for enhancing graduate medical education

# data[].attributes.attachment_link.description
AbstractIntroduction. The last decade has seen many changes in graduate medical education training in the USA, most notably the implementation of duty hour stan

# data[].attributes.headline
AI Learns to Walk (deep reinforcement learning)

# data[].attributes.subject
AI Learns to Walk (deep reinforcement learning)

# data[].attributes.body
Creator: AI Warehouse
Publication year: 2023

# data[].attributes.attachment_link.title
AI Learns to Walk (deep reinforcement learning)

# data[].attributes.body
Creator: Wired
Publication year: 2021

# data[].attributes.attachment_link.title
Computer Scientist Explains Machine Learning in 5 Levels of Difficulty | WIRED

# data[].attributes.body
Creator: CGP Grey
Publication year: 2018

# data[].attributes.headline
Introduction to Programming with Python and Java

# data[].attributes.subject
Introduction to Programming with Python and Java

# data[].attributes.body
Creator: University of Pennsylvania

# data[].attributes.attachment_link.readable_text
Introduction to Programming with Python and Java Specialization

Boost Your Computer Programming Skills. With minimal previous exposure, learn two popular programming languages at an accelerated pace.

Included with

Specialization - 4 course series

Get in-depth knowledge of a subject

2 months at 10 hours a week

Details to know

Add to your LinkedIn profile

Subtitles: English, Arabic, +20 more

Specialization - 4 course series

Get in-depth knowledge of a subject

2 months at 10 hours a week

Specialization - 4 course series

This Specialization starts out by teaching basic concepts in Python and ramps up to more complex subjects such as object-oriented programming and data structures in Java. By the time learners complete this series of four courses, they will be able to write fully-functional programs in both Python and Java, two of the most well-known and frequently used programming languages in the world today.

Introduction to Programming with Python and Java is for students and professionals who have minimal or no prior programming exposure. It's for motivated learners who have experience with rigorous coursework, and are looking to gain a competitive edge in advancing their career. It's for folks who are thinking about applying to the University of Pennsylvania's online Master of Computer and Information Technology degree and want to sample some of the lecture videos and content from the first course in the program. We hope this Specialization is for you.

Topics in this Specialization include language syntax, style, programming techniques, and coding conventions. Learn about best practices and good code design, code testing and test-driven development, code debugging, code and program documentation, and computational thinking.

Applied Learning Project

Learners will write fully-functional Python programs, including an implementation of an online banking system and a data analysis project analyzing movies and ratings from IMDB. Learners will apply Python programming, file I/O, data analysis and visualization, using both PyCharm and Jupyter Notebook.

Learners will also write fully-functional Java programs, including a text file parser that reads, writes, and analyzes text files. Learners will apply Java programming, object-oriented principles, data structures, file I/O, unit testing, code debugging, using Eclipse.

Instructor

University of Pennsylvania

7 Courses * 98,436 learners

Offered by

Why people choose Coursera for their career

"To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."

"I directly applied the concepts and skills I learned from my courses to an exciting new project at work."

"When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."

"Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."

Open new doors with Coursera Plus

Unlimited access to 7,000+ world-class courses, hands-on projects, and job-ready certificate programs - all included in your subscription

Advance your career with an online degree

Earn a degree from world-class universities - 100% online

Join over 3,400 global companies that choose Coursera for Business

Upskill your employees to excel in the digital economy

Frequently asked questions

The courses were designed to be taken in sequence, starting with the first and ending with the last. That being said, learners can pick and choose the courses they are interested in based on their background.

Learners who complete this series of four courses will be able to write fully-functional programs in Python, applying core programming principles, file I/O, and data analysis and visualization. Learners will also be able to write fully-functional Java programs, applying principles of object-oriented programming, data structures, file I/O, unit testing, and code debugging.

Show all 12 frequently asked questions

# data[].attributes.attachment_link.title
Introduction to Programming with Python and Java

# data[].attributes.attachment_link.description
Offered by University of Pennsylvania. Boost Your Computer Programming Skills. With minimal previous exposure, learn two popular programming ... Enroll for free.

# data[].attributes.headline
Java Programming and Software Engineering Fundamentals

# data[].attributes.subject
Java Programming and Software Engineering Fundamentals

# data[].attributes.body
Creator: Duke University

# data[].attributes.attachment_link.title
Java Programming and Software Engineering Fundamentals

# data[].attributes.attachment_link.description
Offered by Duke University. Explore a Career as a Software Engineer. Learn the basics of programming and software development Enroll for free.

# data[].attributes.attachment_link.description
Offered by University of Michigan. Learn to Program and Analyze Data with Python. Develop programs to gather, clean, analyze, and visualize ... Enroll for free.

# data[].attributes.attachment_link.description
Learn the technical skills to get the job you want. Join over 50 million people choosing Codecademy to start a new career (or advance in their current one).

# data[].attributes.body
Creator: Google

# data[].attributes.attachment_link.description
Offered by Google. This course is designed to teach you the foundations in order to write simple programs in Python using the most common ... Enroll for free.

# data[].attributes.body
Creator: Meta

# data[].attributes.attachment_link.description
Offered by Meta. Launch your career as a front-end developer. Build job-ready skills for an in-demand career and earn a credential from ... Enroll for free.

# data[].attributes.headline
Meta Back-End Developer Professional Certificate

# data[].attributes.subject
Meta Back-End Developer Professional Certificate

# data[].attributes.body
Creator: Meta

# data[].attributes.attachment_link.description
Offered by Meta. Launch your career as a back-end developer. Build job-ready skills for an in-demand career and earn a credential from Meta. ... Enroll for free.

# data[].attributes.headline
HTML, CSS, and Javascript for Web Developers

# data[].attributes.subject
HTML, CSS, and Javascript for Web Developers

# data[].attributes.body
Creator: Johns Hopkins University

# data[].attributes.attachment_link.title
HTML, CSS, and Javascript for Web Developers

# data[].attributes.attachment_link.description
Offered by Johns Hopkins University. Do you realize that the only functionality of a web application that the user directly interacts with ... Enroll for free.

# data[].attributes.headline
HOW I WOULD LEARN TO CODE (IF I COULD START OVER AGAIN):

# data[].attributes.subject
HOW I WOULD LEARN TO CODE (IF I COULD START OVER AGAIN):

# data[].attributes.headline
Namanh Kapur - How I Would Learn To Code (If I Could Start Over)

# data[].attributes.subject
Namanh Kapur - How I Would Learn To Code (If I Could Start Over)

# data[].attributes.body
Creator: Namanh Kapur
Publication year: 2022

# data[].attributes.attachment_link.title
How I Would Learn To Code (If I Could Start Over)

# data[].attributes.headline
Jason Goodison - How I would learn to code (If I could start over)

# data[].attributes.subject
Jason Goodison - How I would learn to code (If I could start over)

# data[].attributes.body
Creator: Jason Goodison
Publication year: 2022

# data[].attributes.attachment_link.title
How I would learn to code (If I could start over)

# data[].attributes.headline
Tina Huang - How I would learn to code (if I could start over)

# data[].attributes.subject
Tina Huang - How I would learn to code (if I could start over)

# data[].attributes.body
Creator: Tina Huang
Publication year: 2021

# data[].attributes.attachment_link.title
How I would learn to code (if I could start over)

# data[].attributes.body
Author: Orestis Zekai
Publication year: 2020

# data[].attributes.attachment_link.readable_text
Everyone, at some point at his life, has tried to solve a maze. As defined in Wikipedia, a maze is a path, or a collection of paths, typically from an entrance to a goal. In other words, there is an entrance and an exit and starting from the entrance, you need to navigate through the complex paths and walls and find a path towards the exit.

Of course, there are variations of this simple game. For example you can have multiple entrances or exits, you may have multiple paths that lead you to the exit and many more. In this article we are going to examine the simplest form. One entrance and one exit.

Even if a very big portion of everyone reading this has solved (or at least tried to solve) a maze, only a small percentage has created a maze out of thin air. Even less has wondered how can one create a "good" maze. There is a handful of algorithms out there that can be used to create mazes. Here we will examine the Randomized Prim's Algorithm.

Randomized Prim's Algorithm consists of the following steps:

1. Start with a grid full of walls

2. Pick a cell, mark it as part of the maze. Add the walls of the cell to the walls of the list

3. While there are walls in the list:
1. Pick a random wall from the list. If only one of the two cells that the wall divides is visited, then:
a) Make the wall a passage and mark the unvisited cell as part of the maze
b) Add the neighboring walls of the cell to the wall list.
2. Remove the wall from the list

Let's take a look and see how we can automate this.

First, we need a maze. At first our maze will be empty. We have not decided if any block of the maze will be a cell or a wall. We will denote walls with 'w', cells with 'c' and unvisited blocks with 'u'. So:

For a fixed height and width, we will create a function that creates an empty maze.

def init_maze(width, height):
 maze = []
 for i in range(0, height):
 line = []
 for j in range(0, width):
 line.append('u')
 maze.append(line) return maze

For debugging purposes, we will also create a function that prints the maze in a user friendly format. In order to be able to easily distinguish walls, cells and unvisited blocks, we will paint each letter with a different color, depending on the letter. To do so, we will use colorama .

from colorama import init, Fore # colorama needs to be initialized in order to be useddef print_maze(maze):
init()
 for i in range(0, len(maze)):
 for j in range(0, len(maze[0])):
 if maze[i][j] == 'u':
 print(Fore.WHITE, f'{maze[i][j]}', end="")
 elif maze[i][j] == 'c':
 print(Fore.GREEN, f'{maze[i][j]}', end="")
 else:
 print(Fore.RED, f'{maze[i][j]}', end="")
 print('\n')

Setting height=11 and width=27 we get this output:

u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u u

Of course, you cannot see the color here, but if you run it, you will see that all the blocks are white. And this sums up the first step.

Step two instructs us to pick a spot in the maze and set it as a free spot. And then add the walls of it in a list. So first, let's pick our starting points:

starting_height = int(random.random()*height)
starting_width = int(random.random()*width)

We need to make sure that we do not start on a block that is on the edge of the maze:

So now we will mark this block as a path and add the surrounding walls to the walls list:

maze[starting_height][starting_width] = cell
walls = []
walls.append([starting_height-1, starting_width])
walls.append([starting_height, starting_width-1])
walls.append([starting_height, starting_width+1])
walls.append([starting_height+1, starting_width])

In order to complete step two, we need to denote the blocks round the starting cell as walls:

Step three is the complex one in this algorithm. Let's break it down.

While there are walls in the list pick a random wall from the list

This is simple enough to start and build on this as we progress:

while walls:
 rand_wall = walls[int(random.random()*len(walls))-1]

The next instruction is:

If only one of the two cells that the wall divides is visited

Actually this is a condition. We need to check the surrounding blocks of the wall we are currently processing. Remember that we picked a wall at random in the previous step. We need to check if the two cells that wall divides. But how does a wall divide two cells?

We have two possibilities here. First we need to check the blocks to the left and right of the wall we are processing and then we need to check the blocks above and below the wall. Let's visualize it in order to understand it:

This are 2 cases that our condition will hold. Of course, it can be mirrored, so we have 4 cases in general. Let's add this check to our code:

while walls:
 rand_wall = walls[int(random.random()*len(walls))-1] if maze[rand_wall[0]][rand_wall[1]-1] == 'u' and maze[rand_wall[0]][rand_wall[1]+1] == 'c': if maze[rand_wall[0]-1][rand_wall[1]] == 'u' and maze[rand_wall[0]+1][rand_wall[1]+1] == 'c': if maze[rand_wall[0]+1][rand_wall[1]] == 'u' and maze[rand_wall[0]-1][rand_wall[1]] == 'c': if maze[rand_wall[0]][rand_wall[1]+1] == 'u' and maze[rand_wall[0]][rand_wall[1]-1] == 'c':

Here, we need to be extra careful. We are accessing data inside a list using indexes. We need to make sure we are always accessing a correct index. Meaning that if the selected wall is the one on the first line of the maze, we cannot go and check the cell above it, since it would create an IndexError in Python. So let's add these checks:

while walls:    if rand_wall[1] != 0:    if rand_wall[0] != 0:       if rand_wall[0] != height-1:    if rand_wall[1] != width-1:
 rand_wall = walls[int(random.random()*len(walls))-1]
 if maze[rand_wall[0]][rand_wall[1]-1] == 'u' and maze[rand_wall[0]][rand_wall[1]+1] == 'c':
 if maze[rand_wall[0]-1][rand_wall[1]] == 'u' and maze[rand_wall[0]+1][rand_wall[1]+1] == 'c':
 if maze[rand_wall[0]+1][rand_wall[1]] == 'u' and maze[rand_wall[0]-1][rand_wall[1]] == 'c':
 if maze[rand_wall[0]][rand_wall[1]+1] == 'u' and maze[rand_wall[0]][rand_wall[1]-1] == 'c':

Now that we added this logic, we can continue. If any of the four conditions holds, then:

Make the wall a passage and mark the unvisited cell as part of the maze

This part is a little bit tricky. We need to make sure that every wall that we are going to turn into passage, does not have more than one cell around it. If we do not make this kind of check now, we will end up with a maze that has clusters of passages and the maze will not be good. So we will add an extra check if the surrounding cells are less than two. But first we need to create a function that checks that:

def surroundingCells(rand_wall):
 s_cells = 0
 if (maze[rand_wall[0]-1][rand_wall[1]] == 'c'):
 s_cells += 1
 if (maze[rand_wall[0]+1][rand_wall[1]] == 'c'):
 s_cells += 1
 if (maze[rand_wall[0]][rand_wall[1]-1] == 'c'):
 s_cells +=1
 if (maze[rand_wall[0]][rand_wall[1]+1] == 'c'):
 s_cells += 1 return s_cells

So now we can incorporate that code in the main function:

while walls:
 rand_wall = walls[int(random.random()*len(walls))-1]

For simplicity and readability purposes I am adding the extra code needed only in the first case. But the same applies for the rest.

After all those conditions hold, we can finally turn this wall into a passage and turn the surrounding walls to maze:

while walls:if rand_wall[1] != 0:
 rand_wall = walls[int(random.random()*len(walls))-1]
 if maze[rand_wall[0]][rand_wall[1]-1] == 'u' and maze[rand_wall[0]][rand_wall[1]+1] == 'c':
 s_cells = surroundingCells(rand_wall)
 if s_cells < 2:
 maze[rand_wall[0]][rand_wall[1]] = 'c'

 if (rand_wall[0] != 0):
 if (maze[rand_wall[0]-1][rand_wall[1]] != 'c'):
 maze[rand_wall[0]-1][rand_wall[1]] = 'w'
 if ([rand_wall[0]-1, rand_wall[1]] not in walls):
 walls.append([rand_wall[0]-1, rand_wall[1]])

Again for simplicity purposes, I am adding only one of the surrounding walls. Of course, we also need to check if we are trying to accessing an invalid index and that we are not adding already existing walls in our list. The code above also completes the next step that is:

Add the neighboring walls of the cell to the wall list

Finally, we need to remove this processed block from the walls list. Then we need to continue with the next iteration. Let's create a function for that:

Add this function to our code. If the wall we are processing does not fall in any of the 4 cases we had earlier, we also need to delete it from the list:

while walls:if rand_wall[1] != 0:
 rand_wall = walls[int(random.random()*len(walls))-1]
 if maze[rand_wall[0]][rand_wall[1]-1] == 'u' and maze[rand_wall[0]][rand_wall[1]+1] == 'c':
 s_cells = surroundingCells(rand_wall)
 if s_cells < 2:
 maze[rand_wall[0]][rand_wall[1]] = 'c'

 if (rand_wall[0] != 0):
 if (maze[rand_wall[0]-1][rand_wall[1]] != 'c'):
 maze[rand_wall[0]-1][rand_wall[1]] = 'w'
 if ([rand_wall[0]-1, rand_wall[1]] not in walls):
 walls.append([rand_wall[0]-1, rand_wall[1]])
 delete_wall(rand_wall)
 continue
 continue

If you print the maze when the list of walls is empty, you will notice that there are some cells that will be unvisited. You need to make them walls:

def make_walls(width, height):
 for i in range(0, height):
 for j in range(0, width):
 if (maze[i][j] == 'u'):
 maze[i][j] = 'w'

Finally we need to create an entrance and an exit for the maze:

def create_entrance_exit(width, height):
 for i in range(0, width):
 if (maze[1][i] == 'c'):
 maze[0][i] = 'c'
 break
 for i in range(width-1, 0, -1):
 if (maze[height-2][i] == 'c'):
 maze[height-1][i] = 'c'
 break

If we define the while loop as a function (let's call it create_maze ), then we can put this all together and test our script:

maze = init_maze(width, height)starting_height = int(random.random()*height)maze[starting_height][starting_width] = cellcreate_maze()
print_maze(maze)
starting_width = int(random.random()*width)
walls = []
make_walls(width, height)
create_entrance_exit(width, height)
walls.append([starting_height-1, starting_width])
walls.append([starting_height, starting_width-1])
walls.append([starting_height, starting_width+1])
walls.append([starting_height+1, starting_width]) print_maze(maze)

And this is pretty much it! Let's run it and see what comes up!

As you can see, we have a maze! Of course, you can change the width and the height to create larger or smaller mazes. Also, by changing the order we are checking the 4 cases may change the structure of our maze. Feel free to try different variations and let me know about the results you get.

The full functional code can be found here.

I hope you enjoyed the article and try it yourself. In the meanwhile, you can find the rest of the "Fun with Python" series here.

# data[].attributes.attachment_link.description
Welcome to "Fun with Python", part 1. In this part, we will automate maze creation, utilizing Prim's randomized algorithm. Everyone, at some point at his life, has tried to solve a maze. As defined...

# data[].attributes.headline
The Classic Tic-Tac-Toe Game in Python 3

# data[].attributes.subject
The Classic Tic-Tac-Toe Game in Python 3

# data[].attributes.body
Author: James Shah
Publication year: 2019

# data[].attributes.attachment_link.readable_text
We are going to build a two-player tic-tac-toe game, which we can play in the command-line. Initially, we'll make an empty game board and then we'll take inputs from the players and we'll check for the winning condition and if the whole board gets filled and no one wins, we'll declare the result as "Tie" and ask users if they want to restart the game.

What will we use?

We will build this game using Python 3, so make sure you have it installed on your laptop/computer and we are good to go.

What we'll learn?

After building this game, we can get a pretty clear idea about dictionaries in python, how to access dictionaries, how to iterate over dictionaries, for loop, if-else conditions and functions in python.

How does the game work?

The board is numbered like the keyboard's number pad. And thus, a player can make their move in the game board by entering the number from the keyboard number pad.

Code Time💻

First, let's see how we are going to use a dictionary to create our game board. A dictionary is a primitive data type in python which stores data in "key: value" format. and thus, we'll create a dictionary of length 9 and each key will represent a block in the board and its corresponding value will represent the move made by a player. and we'll create a function printBoard() which we can use every time we want to print the updated board in the game.

Now, in the main function, we'll first take the input from the player and check if the input is a valid move or not. If the block that player requests to move to is valid, we'll fill that block else we'll ask the user to choose another block.

Now, to check the winning condition, we'll check a total of 8 conditions and whichever player has made the last move, we'll declare that player as a winner. And if no one wins, we'll declare 'tie'

And now, we'll ask the players if they want to play again.

And boom!! Now we have our game ready.😍😍

The Full Code:

Play Time:

Thanks For Scrolling, I hope you liked it. Hit me up with your views and suggestions in the comment down below.🙌

# data[].attributes.attachment_link.title
The Classic Tic-Tac-Toe Game in Python 3

# data[].attributes.attachment_link.description
So, the best and the most fun way to learn any programming language for me has always been by developing a fun project like a simple game or some project that I would use in my daily life. So, when I...

# data[].attributes.body
Author: Tony Yiu
Publication year: 2019

# data[].attributes.attachment_link.readable_text
This post is in NO way an attempt to promote blackjack or the act of gambling. Any time you gamble at a casino, the odds are stacked against you - and over time you WILL lose money. Don't risk what you cannot afford to lose! Corrections: I realized (thanks to a friendly tip from @DonBeham) that under certain conditions, my total_up function was handling multiple aces incorrectly. I have updated both the code below and

Random in that you don't know what the result will be game to game.

And inevitable in that you know what the average result of a large number of games will be.

on my GitHub

1. Players make their bets.

2. Players are dealt 2 cards.

3. Dealer is dealt 2 cards where the second card is hidden from the players.

4. The objective of the game is to have a higher point total than the dealer (but no more than 21, anything over 21 is an automatic loss called a bust) - if you beat the dealer in this way, you win from the casino what you bet (you also win if the dealer busts). Aces can be worth either 1 or 11; every other card is worth its face amount (face cards are worth 10).

5. An initial 2 card hand composed of an ace and a face card is called a blackjack and is the best possible hand.

6. After the first round of dealing, each player has the option to hit (receive more cards) or stay (no more cards). If hitting results in the player...

. My apologies!
I haven't coded anything for the blog lately so I wanted to do a programming related post. One of the classic applications of probability and statistics is the study of games of chance (gambling). Games of chance (card games, dice games, etc.) are a favorite of statisticians because they exhibit both randomness and a certain inevitability:

Today, we will study blackjack by writing up a blackjack simulator in Python, simulating a bunch of games, and then studying how our player did. I will assume some basic familiarity with the game of Blackjack, but here is a quick refresher for how the game is played:

# data[].attributes.attachment_link.description
This post is in NO way an attempt to promote blackjack or the act of gambling. Any time you gamble at a casino, the odds are stacked against you - and over time you WILL lose money. Don't risk what...