Monthly Archives: June 2020

Phil 6.10.20

Finish ACSOS review

GPT-2 Agents

  • Generate embeddings
    • Trying running much longer sequences (max_length = 1000). The lets games run long enough  that they often conclude (the term “resigns”, “wins”, or “draw occurs in the text)
    • Put together a simple regex ‘[a-h][1-8]’ that pulls out all the squares in sequence from a game
    • Extracting game square sequences to create files that will feed into Word2Vec. The class is started and most of the issues are worked out. I added a check for game endings so beginning and endings are not place together oddly.
    • Here’s the trimmed input text
      The game begins as white uses the Sicilian opening. and black countering with Najdorf, Adams attack. Loek Van Wely moves white pawn from e2 to e4. Black moves pawn from c7 to c5. In move 2, White moves knight from g1 to f3. Black moves pawn from d7 to d6. White moves pawn from d2 to d4. Black moves pawn from c5 to d4. Black takes white pawn. White moves knight from f3 to d4. White takes black pawn. Black moves knight from g8 to f6. In move 5, White moves knight from b1 to c3. Arseniy Nesterov moves black pawn from a7 to a6. Loek Van Wely moves white bishop from c1 to e3. Black moves pawn from e7 to e6. In move 7, White moves pawn from f2 to f4. Black moves knight from b8 to d7. White moves queen from d1 to d2. Black moves pawn from b7 to b5. Loek Van Wely queenside castles. Black moves bishop from f8 to e7. White moves bishop from f1 to d3. Arseniy Nesterov kingside castles. White moves king from c1 to b1. Black moves rook from a8 to b8. White moves pawn from g2 to g3. Black moves queen from d8 to a5. Loek Van Wely moves white king from b1 to a1. Black moves bishop from e7 to d6. Black takes white knight. Loek Van Wely moves white bishop from d3 to e4. White takes black pawn. Black moves rook from b8 to b2. Black takes white pawn. In move 17, White moves bishop from e4 to h7. White takes black pawn. Check. Arseniy Nesterov moves black king from g8 to h8. White moves bishop from h7 to d3. Black moves bishop from d6 to f4. Black takes white pawn. Check. In move 19, White moves bishop from e3 to f4. White takes black bishop. Black moves rook from b2 to f2. White moves rook from h1 to f1. Black moves knight from d7 to e5. White moves queen from d2 to e2. Black moves queen from a5 to d2. In move 22, White moves knight from c3 to e2. White takes black queen. Black moves rook from f2 to e2. Black takes white knight. Loek Van Wely moves white bishop from f4 to e3. Black moves rook from e2 to e3. Black takes white bishop. White moves pawn from f4 to f5. Black moves rook from f8 to d8. White moves pawn from a2 to a4. Arseniy Nesterov moves black bishop from c8 to b7. White moves pawn from a4 to a5. Arseniy Nesterov moves black bishop from b7 to c8. White moves pawn from a5 to b6. White takes. Arseniy Nesterov moves black pawn from a6 to b5. Black takes white pawn. White moves queen from e2 to b5. White takes black pawn. Black moves knight from e5 to c4. White moves pawn from h2 to h3. Black moves knight from c4 to a5. In move 30, Loek Van Wely moves white queen from b5 to a4. Arseniy Nesterov moves black pawn from h7 to h6. White moves bishop from d3 to b1. Black moves rook from d8 to d1. Check. Loek Van Wely
    • And here’s the sequence
      e2 e4 c7 c5 g1 f3 d7 d6 d2 d4 c5 d4 f3 d4 g8 f6 b1 c3 a7 a6 c1 e3 e7 e6 f2 f4 b8 d7 d1 d2 b7 b5 f8 e7 f1 d3 c1 b1 a8 b8 g2 g3 d8 a5 b1 a1 e7 d6 d3 e4 b8 b2 e4 h7 g8 h8 h7 d3 d6 f4 e3 f4 b2 f2 h1 f1 d7 e5 d2 e2 a5 d2 c3 e2 f2 e2 f4 e3 e2 e3 f4 f5 f8 d8 a2 a4 c8 b7 a4 a5 b7 c8 a5 b6 a6 b5 e2 b5 e5 c4 h2 h3 c4 a5 b5 a4 h7 h6 d3 b1 d8 d1

       

    • I can do other things like split into white and black, but that’s pretty tricky and I don’t think it’s worth it
  • Start building networks. Here are some api possibilities

GOES

  • If the devlab is still up, work on pulling down data. Nope, the VPN is working so badly today that I can’t even load my webmail
  • Going to work on the download and transfer using my local Influx – done!

influx_copy

Complete copy of remote data on local server

  • 2:00 Meeting

Phil 6.9.20

I’ve been thinking about writing a paper about how the development of conspiracy theories resembles the mode collapse condition in GAN creation. There is some recent research in the GAN community on developing tools for detecting mode collapse (Jai & Zhao, 2019) that I think could be extended to identifying conspiracy theories and the processes that create them. Maybe for ICTAI 2020?

Studying Programming in the Neuroage: Just a Crazy Idea?

  • What we were proposing to do was simple yet ambitious. Using functional magnetic resonance imaging, we might better understand what goes on in the minds of programmers as they read and understand code.
  • The results indicated that a specific network of brain areas in the left hemisphere was used by participants to understand code, including areas related to working memory, divided attention, and reading comprehension. Surprisingly, we did not observe cognitive processes related to mathematical and logical reasoning, which would be consistent with the perspective that programming is a formal, logical, and mathematical process.

GPT-2

  • Start storing data!

db

  • Try new probes – done!
    probe_list = ['The game begins as ', 'In move 10', 'In move 20', 'In move 30', 'In move 40', 'White takes black ', 'Black takes white ', 'Check. ']
  • Added the raw text to the table_moves instead of comments. Here’s the new and improved:

db

  • Start thinking about metrics, like adjacency matrices by piece?
  • Build gensim embeddings of games and pieces
  • Build agent network graphs by piece type and from/to

GOES

  • Nothing back from Vadim, so I think I’ll continue on my Wasserstein Loss algorithm
  • Hey! The DevLab Influx is reachable again!

influx

  • Going to take advantage of this and find more mnemonics, Done!
  • Now I need to figure out a good way to pull down the data and load it on my system
  • Working on DevLabInfluxQuery class that extends InfluxQuery. Done, but fails with one of these exceptions:
    • Unable to parse CSV response. FluxTable definition was not found.
    • Connection aborted.’, TimeoutError(10060, ‘A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond’, None, 10060, None)
    • Tried upgrading my influxdb-client (pip install –upgrade influx-client) from 1.5 to 1.9. Hopefully i didn’t break too much. Didn’t fix it with that, but I got the port number for Boris, which fixed things

devlabInflux

ML seminar

  • Discussed options for visualizing relationships between nodes. Starting with just straightforward plotting of connected nodes. Also, plotting by piece. Another option is to use the gensim library to do a word2vec embedding and visualize it. I think I’ll start there because I’m curious.
  • To improve the embedding, it might be useful to generate entire games and parse them.

 

Phil 6.8.20

Not at all happy with this COVID weight gain. My preferred stress management tool is exercise, but I’m at a minimum of 20 miles/day. Usually about 100 miles+ on weekends.

Starting to think about writing something on the ethics of mode collapse

D20

Florida

GPT-2 Agents

  • Back to pulling move and piece information out of generated text – done
  • Added heuristic for move number
  • Created dicts for db data. Add writes tomorrow!

GOES

  • Adding read tests – done! Had to screw around with utc conversions for a while
    • Writes are roughly 1/2 sec per 1,000
    • Reads are about 2/100 sec per 1,000
  • Tried to log in and get on the devlab influx system – nope:

bad gateway

  • Trying to figure out what makes sense to do next. Ping Vadim? Done

Phil 6.7.20

I know it seems like an artifact from another time, but the map is coming along. Here’s the us, based on 14 day trend in reported deaths:

dtz_map

Neural networks learning how to talk to each other. Need to see if there are any publications:

nn_chatter

Phil 6.5.20

GPT-2 Agents

  • Started a google doc for the GPT-2 Chess agents that will be grist for the paper(s)
  • Create probes for each piece, like:
    • white moves pawn from e2 to
    • black moves pawn from e7 to
    • A slightly more sophisticated parser will need to work with “The game begins
  • I can take the results of multiple probes and store them in the table_moves, then run statistics by color, piece, etc
  • Then see if it’s possible to connect one piece to another piece using a “from/to chain” across multiple pieces. There will probably be some sort of distribution where the median(?) value should be a set of adjacent squares.
  • The connections can be tested by building adjacency matrices by piece and by move number range
  • Started ChessMovesToDb. Might as well work on the tricky parse of  “The game begins “. Making progress. My initial thought on how to parse moves doesn’t handle weird openings like “4.e3, Gligoric system with 7…dc” Need to strip to the the first occurance of “move”, I think:
    white uses the Nimzo-Indian opening. and black countering with 4.e3, Gligoric system with 7...dc. White moves pawn from d2 to d4. Black moves knight from g8 to f

GOES

  • More timing tests
    • Add explicit time to the write
    • This should also be the basis of the system that will pull data from the DevLab Influx
  • Continue search for important mnemonics during yaw flip – nope, still can’t log into DevLab influx
  • Working on setting up arbitrary times spans and a new bucket for tests. Writing data works. Now I need to extend the number of series, tags, etc influxAll the writes are working. I’ll do the reads Monday. Everything looks pretty consistent, though.

timing

Phil 6.4.20

GPT-2 Agents

  • Thinking about how to parse the data to build maps.
    • Clearly, there are black and white agents (the players). Option 1 would be to simply collect the from-to points at the player level
    • One step down would be the piece family, pawns, rooks, bishops. The king and queen would be single instances
    • The most granular would be to track the individual pieces.
    • The issue I’m struggling with is when pieces pass over squares rather than through them. There is no explicit d3 when white moves the pawn from d2 to d4. Trying to think of the best way to uncover the latent information.
    • I think a good way to procrastinate about this problem is to parse the games into a database of moves. The format is always “<player/color> moves <(color)piece> from <start> to <end>. There is additional information as well (game, players, move number), but that could be added later.
    • Done
    • table_moves
    • Sent a note to Thomas Wolf at Huggingface
    • I know what I’m going to do!
      • Create probes for each piece, like:
        • white moves pawn from e2 to
        • black moves pawn from e7 to
        • A slightly more sophisticated parser will need to work with “The game begins
      • I can take the results of multiple probes and store them in the table_moves, then run statistics by color, piece, etc
      • Then see if it’s possible to connect one piece to another piece using a “from/to chain” across multiple pieces. There will probably be some sort of distribution where the median(?) value should be a set of adjacent squares.
      • The connections can be tested by building adjacency matrices by piece and by move number range

GOES

  • Hey! The VPN is much more responsive today! Logged into Influx
  • Getting the right time for the query from here
    • start: 2020-04-06 15:30:00.000
    • end: 2020-04-06 18:00:00.000
    • Need to get the right mnemonics. Pinged Bruce
  • Starting some timing tests on my local influx copy
  • The VPN has stopped again
  • 2:00 NSOF Meeting – Nice demo by Jason
  • 3:30 AIMS IRAD
    • Status. John is going part time
    • Railed against the poor VPN access to the DevLab

ML Brownbag – Aaron did a nice job

Phil 6.3.20

MarthaRaddatz

“When the students poured into Tiananmen Square, the Chinese government almost blew it. Then they were vicious, they were horrible, but they put it down with strength. That shows you the power of strength”Donald Trump, 1990

GPT-2 Agents

  • Finished finetuning the model yesterday, and tried running it with the following seeds:
    text_list = ['The game begins as ',
                 'White moves ',
                 'Black moves ',
                 'In move 1, ',
                 'In move 40, ']
  • The results are pretty incredible:

generated_chess

  • Opening moves (“The game begins as”, “In move 1”) make sense. White always moves first. Pieces move in reasonable, permissible ways (e.g d3 to d4)
  • The model knows how to take pieces correctly. The red lines connect moves by White and the counter-move by black, then the taking of the piece.
  • Moves that occur later in the game are also sensible. (“In move 40”, “White moves”. “Black moves”)
  • Names occur very infrequently. And Loek is probably the most frequent name, since his entire career is in a pgn file
  • I think the next steps are:
    • Create marker text for SBoW analysis, like  “In move 1, White moves pawn from d2 to d4. Black moves knight from g8 to f6.“, and “In move 40, White moves rook from d1 to d7. Black moves pawn from e5 to e4.” so that I can use the antibubble analytics
    • Create a parser that looks for the movements of particular pieces (white pawns, black knights, etc) and see if I can build a map from that using the agent tools. Pawns and kings may provide the projection, while other pieces move over that
  • Good results today!!!

GOES

  • Create Github repo for brownbag – done
  • Status report – done
  • Ping Biruh about accessing the on-site InfluxDB – done
  • Ping Boris and Bruce for mnemonics and yaw flip times
  • 2:00 meeting
  • Build a set of stress tests for influx.
    • samples 300 x 7,000 floating point
    • tags: benchmark tags 2, 4, 8, 16, 32, etc
    • Vadim for Cassie DB questions

#COVID

  • Meeting cancelled

Phil 6.2.20

Military

Remember when all we had to worry about dealing with a pandemic? Good times.

GPT-2 Agents

  • Downloaded a lot of PGN files. Looks like I could pull down the entire archive here: theweekinchess.com/twic. Need to write a script that pulls down the files and unzips them
  • Need to scan the directory and parse each pgn file – done
  • Created train (700,000 lines and eval 100,000 lines) files
  • Feed into GPT-2! Seems to be cranking along:

chessGPT

GOES

  • Submitted paper and slide deck
  • Putting together a brown-bag style presentation for the development of the GAN code
  • Ping Vadim to see what to do next?

ML seminar

  • Presented brown-bag talk
  • Need to share slides and put code on GitHub

 

Phil 6.1.20

century

It’s all been a bit much recently, so yesterday I took advantage of the wonderful weather and went on a long ride with a few friends.

D20 – Nagged Zach with this image. He responses generally were “It is generally pretty optimistic around here”, and “According to google is is getting better. I wonder where their data comes from”.

Colorado

GPT-2 Agents

  • Still some debugging. added output of the raw move files to find games better
  • Dates aren’t right either – fixed
  • Added some better triggering of the print_board method
  • WOW! I mean it shouldn’t be that surprising, but the pgn is wrong. Going to add a flag for games with problem moves. Then I think I should be able to generate text.

GOES

  • Put paper in the right format (word?)
  • Create the slides. Verify the speaking duration – done. It’s 20 minuts, I think probably 15 for talk and 5 for questions
  • Found the technical paper repo. Looks like I didn’t have to worry about length! http://gvsets.ndia-mich.org/publications.php#MSTV
  • Uploaded! Just use the info in the email from GVSETS Tech Session Admin

Google is profiting from dozens of websites that peddle hoaxes and conspiracy theories about Covid-19, according to a Tech Transparency Project (TTP) investigation, revealing a major hole in the company’s claims that it’s fighting misinformation about the pandemic.

Google