This file contains hidden or 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
;; 2048 machine learning analysis | |
;; Order, Free Space, Weight Distribution | |
;; Scoring Analysis, Nabla ∇ Divergence | |
;; initial board state - choose wisest direction for move (up down left right) | |
;; 2 0 2 4 0 pairs (actually a scoring pair is in there once the space is crossed.) | |
;; 2 2 4 0 1 pair | |
;; 4 4 0 0 1 scoring pair, 1 blank pair | |
;; 4 0 8 0 1 blank pair |
This file contains hidden or 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
(defn get-slope [[x1 y1] [x2 y2]] | |
(/ (- x2 x1) (- y2 y1))) | |
(get-slope [500 400][290 600]) | |
(defn angle-offset [slope] | |
(java.lang.Math/atan slope)) | |
(angle-offset (get-slope [500 400][300 490])) |
This file contains hidden or 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
Map<Integer, CorefChain> graph = document.get(CorefChainAnnotation.class); | |
for (Map.Entry<Integer, CorefChain> entry : graph.entrySet()) { | |
CorefChain c = entry.getValue(); | |
System.out.println("\nClusterID: " + entry.getKey()); | |
CorefMention cm = c.getRepresentativeMention(); | |
if (cm != null) { | |
System.out.println("Representative Mention: " + cm.mentionSpan + " @" + cm.position.elems()[0] + " H:" + cm.position.elems()[1] + " [ " + cm.startIndex + ", " + cm.endIndex + "]"); | |
List<CorefMention> cms = c.getCorefMentions(); | |
System.out.print("Mentions:\n"); | |
for (CorefMention mention : cms) { |