-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmarkov.html
More file actions
191 lines (149 loc) · 11 KB
/
markov.html
File metadata and controls
191 lines (149 loc) · 11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Markov Chain Reddit Bots in the Worst Subreddits - Jennifer Kruse</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/clean-blog.min.css" rel="stylesheet">
<link href="css/application.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a style="color:white" href="http://jenniferkruse.me">Home</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- Page Header -->
<!-- Set your background image for this header on the line below. -->
<header class="intro-header" style="background-image: url('img/markov/header.jpg')">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="post-heading">
<h1 style="color: white">Markov Chain Reddit Bots in the Worst Subreddits</h1>
<h2 class="subheading" style="color: white">I made some Markov chain bots to post in my least favorite subreddits.
</h2>April 5, 2017</span>
</div>
</div>
</div>
</div>
</header>
<article>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<p>My favorite type of "just for fun" programming is to make bots. Specifically, bots to mess with other people. Previously I've made <a href="http://jenniferkruse.me/tinderbot.html">Tinder bots</a>, <a href="http://jenniferkruse.me/post20150302.html">Reddit bots</a>, and <a href="http://jenniferkruse.me/post20150120.html">Twitter bots</a>. (I also have a few tutorials up if you're interested in making one yourself!) It's been a while since I've made any, so I decided to troll around a few subreddits I don't particularly like. I wanted to see what would happen if I trained a Markov dictionary based on previous comments from one of those subreddits, and then released the bot into the subreddit to reply to other users. </p>
<p>A <a href="https://en.wikipedia.org/wiki/Markov_chain">Markov chain</a> in this sense means that to construct a sentence, we look at what's statistically likely to be the next word. For example, in a subreddit about cats, where people mostly talk about cats, if we started a sentence with "The", and the most likely word to come after "The" (based on previous comments we have fed the bot) is "cat", then the next word in the sentence will be "cat." Then we find the word most likely to come after "cat", and so on, until we have a sentence. Usually these sentences aren't super coherent, but they sound like something that <i>could</i> be coherent to the right person. I have screenshots below so you'll see what I mean. For each bot, first I gave it hundreds of thousands of comments to feed into its dictionary (or, the data that stores the probabilities for these words), and then made it construct its sentences based on these probabilities to reply to other comments. So basically, the bot is replying to users in the subreddits, using their own words. </p>
<br>
<h3>/r/the_donald</h3>
<p>/r/the_donald is the main pro-Donald Trump subreddit. After consuming hundreds of comments, this bot mostly talked a lot about Islam and Muslims (who's surprised?). What was more surprising, was actually seeing what people comment about in /r/the_donald. It wasn't uncommon for people to suggest Muslims and various women should be hanged. Even though most of what the bot posted was gibberish, it still got upvotes. This was the most interesting subreddit my bot posted in, because other users would actually reply to the bot's comments, acting like it said something coherent. Also, so many of my comments would get immediately removed by the mods. Unfortunately, I didn't get screenshots of what the bot was replying to fast enough before my comments got deleted. But I am interested in revisiting this subreddit with bots again sometime.</p>
<img src="img/markov/pic1.png" class="blogImgShort"><br><br>
<img src="img/markov/pic2.png" class="blogImgShort"><br><br>
<img src="img/markov/pic3.png" class="blogImgShort"><br><br>
<img src="img/markov/pic4.png" class="blogImgShort"><br><br>
<img src="img/markov/pic5.png" class="blogImgShort"><br><br>
<img src="img/markov/pic6.png" class="blogImgShort"><br><br>
<img src="img/markov/pic7.png" class="blogImgShort"><br><br>
<img src="img/markov/pic8.png" class="blogImgShort"><br><br>
<img src="img/markov/pic9.png" class="blogImgShort"><br><br>
<p>At the end of day 2, we were banned for 30 days after making a comment against non-Muslim people. We had positive 25 comment karma. </p>
<h3>/r/incels</h3>
<p>Next I decided to erase the bot's dictionary (starting from scratch), and make it learn from /r/incels, a subreddit for men who cannot find girlfriends. (Incel means involuntarily celibate.) This doesn't sound so bad, but they often advocate for legal rape, lowering the age of consent, and wanting to kill men who can easily find girlfriends. The bot actually got quite a few comment replies here, even though the comments still didn't make much sense. The bot liked to talk about other men, sexual topics, and for some reason, being black. Eventually the bot got banned (but only for 3 days). We had positive 39 comment karma.</p>
<img src="img/markov/pic10.png" class="blogImgShort"><br><br>
<img src="img/markov/pic11.png" class="blogImgShort"><br><br>
<img src="img/markov/pic12.png" class="blogImgShort"><br><br>
<img src="img/markov/pic13.png" class="blogImgShort"><br><br>
<img src="img/markov/pic14.png" class="blogImgShort"><br><br>
<img src="img/markov/pic15.png" class="blogImgShort"><br><br>
<img src="img/markov/pic16.png" class="blogImgShort"><br><br>
<img src="img/markov/pic17.png" class="blogImgShort"><br><br>
<img src="img/markov/pic18.png" class="blogImgShort"><br><br>
<img src="img/markov/pic19.png" class="blogImgShort"><br><br>
<img src="img/markov/pic20.png" class="blogImgShort"><br><br>
<img src="img/markov/pic21.png" class="blogImgShort"><br><br>
<h3>/r/theredpill</h3>
<p>/r/theredpill is a subreddit for pickup artists, however, as a whole they are very disrespectful towards women. </p>
<img src="img/markov/pic22.png" class="blogImgShort"><br><br>
<img src="img/markov/pic23.png" class="blogImgShort"><br><br>
<img src="img/markov/pic25.png" class="blogImgShort"><br><br>
<img src="img/markov/pic26.png" class="blogImgShort"><br><br>
<img src="img/markov/pic29.png" class="blogImgShort"><br><br>
<img src="img/markov/pic30.png" class="blogImgShort"><br><br>
<img src="img/markov/pic31.png" class="blogImgShort"><br><br>
<img src="img/markov/pic32.png" class="blogImgShort"><br><br>
<img src="img/markov/pic33.png" class="blogImgShort"><br><br>
<img src="img/markov/pic34.png" class="blogImgShort"><br><br>
<img src="img/markov/pic36.png" class="blogImgShort"><br><br>
<p>I ran this bot for a long time and eventually gave up on being banned. I got downvoted a lot, ending up with only 19 comment karma. My API calls to Reddit kept getting rate limited, and I think it was because I didn't have as much comment karma. A lot of the replies were also mean to me, unlike the previous two subreddits. </p>
<p class="contactText"> Questions? Comments? Don't hesitate to <a href="http://jenniferkruse.me/about">contact me</a>!</p>
<!--
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'jenniferkruse'; // required: replace example with your forum shortname
var disqus_identifier = 'markov';
var disqus_url = 'http://jenniferkruse.me/markov.html';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> -->
</div>
</div>
</div>
</article>
<hr>
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src="js/clean-blog.min.js"></script>
</body>
</html>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-59909033-1', 'auto');
ga('send', 'pageview');
</script>