Skip to content

Instantly share code, notes, and snippets.

View hbusul's full-sized avatar

Hamdi Burak Usul hbusul

View GitHub Profile
@hbusul
hbusul / problem.py
Created September 24, 2025 13:33
simple opt
# min x + y ** 2 + z**3
# s.t
# 1/x + 2/y + 3/z = 1
# x =(nearly) 19.7297094474278
# y =(nearly) 7.301528640155925
# z =(nearly) 4.441813756499455
import sys
"""
Given a standard 8×8 chessboard, write a function to determine a sequence of moves for
a knight such that it visits every square exactly once
"""
import gamspy as gp
m = gp.Container()
moves = gp.Set(m, name="moves", records=range(64))