Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def mutations(state, boat_size): | |
m_left, k_left, boat, m_right, k_right = state | |
sign, other_side = (-1, "R") if boat == "L" else (1, "L") | |
naive_mutations = [ | |
(m_left + sign * m_diff, k_left + sign * k_diff, | |
other_side, | |
m_right - sign * m_diff, k_right - sign * k_diff) | |
for m_diff in range(boat_size + 1) | |
for k_diff in range(boat_size + 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
import pygame | |
from pygame.draw import circle, line | |
from pygame.locals import * | |
import misjonarze | |
# Initialize the game engine | |
pygame.init() | |
# Constants |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!wget -N https://raw.githubusercontent.com/anagorko/linalg/main/linalg.py | |
import linalg |