Skip to content

Commit

Permalink
text
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph-Willem-Ricci committed Nov 28, 2024
1 parent b2d23bb commit c056946
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 2 deletions.
1 change: 1 addition & 0 deletions js/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
unimax.run
51 changes: 50 additions & 1 deletion js/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,65 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>unimax.run</title>
<link rel="stylesheet" href="styles.css">
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700" rel="stylesheet">
</head>
<body>
<div id="game-container">
<h2>unimax: cooperative algorithm</h2>
<div id="chessboard"></div>
<div id="game-info">
<p id="turn-info"></p>
<p id="captured-pieces"></p>
</div>
<div id="about">
<p>
Claude Shannon's 1950 paper
<a href="https://vision.unipv.it/IA1/ProgrammingaComputerforPlayingChess.pdf" target="_blank">
Programming a Computer for Playing Chess</a>
was a seminal work for the field of
Artificial Intelligence, specifically in the area of algorithmic decision-making for
<em>adversarial games</em>. In this paper, Shannon employs the <em>Minimax Algorithm</em>, which takes
as its premise that your opponent will always choose the move that is best for them, and worst for you.
This fundamentally <em>adversarial</em> premise is the same premise that leads to dynamics like
<a href="https://en.wikipedia.org/wiki/Tragedy_of_the_commons#Climate_change"
target="_blank"> tragedies of the commons</a> and
<a href="https://en.wikipedia.org/wiki/Artificial_intelligence_arms_race" target="_blank">arms races</a>.
</p>
<p>
Adversarial Games and the Minimax Algorithm are still taught as foundational concepts
in
<a href="https://artificial-intelligence-class.org/homeworks/adversarial-search/adversarial-search.html" target="_blank">A</a><a href="https://cs.stanford.edu/people/eroberts/courses/soco/projects/2003-04/intelligent-search/minimax.html" target="_blank">r</a><a href="https://cs50.harvard.edu/ai/2024/notes/0/#minimax" target="_blank">t</a><a href="https://zoo.cs.yale.edu/classes/cs470/lectures/s2019/06-Game-Playing.pdf" target="_blank">i</a><a href="https://ocw.mit.edu/courses/6-034-artificial-intelligence-fall-2010/resources/lecture-6-search-games-minimax-and-alpha-beta/" target="_blank">f</a><a href="https://www.cs.cmu.edu/~15381-s19/lectures/15381_Sp19_Lecture_4_Adversarial_Search.pdf" target="_blank">i</a><a href="https://aima.cs.berkeley.edu/4th-ed/pdfs/newchap06.pdf" target="_blank">c</a><a href="http://courses.cms.caltech.edu/cs154/slides/cs154-04-adversarial-search-annotated.pdf" target="_blank">i</a><a href="https://blogs.cornell.edu/info2040/2022/09/13/56590/" target="_blank">a</a><a href="https://pages.mtu.edu/~nilufer/classes/cs4811/2014-spring/lecture-slides/cs4811-ch05-adversarial-search.pdf" target="_blank">l</a>

<a href="https://www.khoury.northeastern.edu/home/camato/5100/adversarial_search.pdf" target="_blank">I</a><a href="https://www.cs.miami.edu/home/visser/csc545-files/AdversSearch.pdf" target="_blank">n</a><a href="https://courses.cs.washington.edu/courses/cse573/12sp/lectures/24-games.pdf" target="_blank">t</a><a href="https://people.cs.pitt.edu/~milos/courses/cs1571-Fall03/lectures/Class8.pdf" target="_blank">e</a><a href="https://classes.engr.oregonstate.edu/eecs/spring2019/cs331/slides/AdversarialSearch1.2pp.pdf" target="_blank">l</a><a href="https://courses.cs.vt.edu/cs4804/Fall16/pdfs/5%20Adversarial%20Search.pdf" target="_blank">l</a><a href="https://people.cs.georgetown.edu/~maloof/cosc270.s22/rn+aima3e+minimax.pdf" target="_blank">i</a><a href="https://www.cs.swarthmore.edu/~meeden/cs63/f11/russell-norvig-ch5.pdf" target="_blank">g</a><a href="https://courses.cs.duke.edu/spring15/compsci270/slides/270_4.pdf" target="_blank">e</a><a href="https://cdn.vanderbilt.edu/vu-my/wp-content/uploads/sites/2495/2019/04/14192744/Lecture.10.10.17.pdf" target="_blank">n</a><a href="https://www.cs.dartmouth.edu/~devin/cs76/03_chess/chess.html" target="_blank">c</a><a href="https://www.cs.utoronto.ca/~strider/docs/D84_MiniMax.pdf" target="_blank">e</a>
courses at universities around the world.
By teaching this adversarial algorithm to computer science students for decades, have we
been proliferating an adversarial paradigm in our society and in the code that increasingly shapes it?
Many dynamics can be modeled through an adversarial lens.
<a href="https://youtu.be/MacJ4p0vITM" target="_blank">Social media platforms</a>
with advertising-based business models try to maximize user time-on-site, while users try to minimize their own time-on-site.
<a href="https://www.thetimes.com/article/short-sellers-make-billions-as-magnificent-7-ride-into-trouble-tmqhhplgz" target="_blank">Institutional investors</a>
try to asymmetrically to maximize their own returns.
<a href="https://www.hrw.org/news/2024/09/10/questions-and-answers-israeli-militarys-use-digital-tools-gaza" target="_blank">Militaries</a>
are interested in domination, not cooperation.
</p>
<p>
The <em>Unimax Algorithm</em> is a cooperative game-playing alternative to the Minimax Algorithm.
The underlying premise of <em>Unimax</em> is that there is only one metric that matters: the collective utility of all players.
In the context of chess, this means that each player is trying to avoid capturing the opponent's pieces
and trying to limit future movement as little as possible. The result is a beautiful, cooperative dance
in which both players move around each other so as to give each other as much space as possible.
</p>
<p>
I invite you to watch this traditionally adversarial game being played under a cooperative, collectively-minded paradigm,
and imagine a world in which the algorithms that shape our society did the same.
</p>
<p>
<a href="https://github.com/Joseph-Willem-Ricci/unimax">source code</a>
by
<a href="https://resonance.tools/about">Joseph Willem Ricci</a>
</p>
</div>
</div>
<script src="unimax_chess.js"></script>
</body>
Expand Down
6 changes: 6 additions & 0 deletions js/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,10 @@ body {

#captured-pieces {
font-size: 16px;
}

#about {
font-size: 14px;
text-align: left;
max-width: 1000px;
}
2 changes: 1 addition & 1 deletion js/unimax_chess.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const BISHOP_VAL = 3;
const ROOK_VAL = 5;
const QUEEN_VAL = 9;
const KING_VAL = 200;
const MOVE_VAL_DENOMINATOR = 7.5; // ~ between preferring no capture vs preferring free movement
const MOVE_VAL_DENOMINATOR = 9; // ~ between preferring no capture vs preferring free movement


class Piece {
Expand Down

0 comments on commit c056946

Please sign in to comment.