tag:blog.eliskeggs.com,2014:/feedEli Skeggs2017-01-23T09:00:52-08:00Eli Skeggshttp://blog.eliskeggs.comSvbtle.comtag:blog.eliskeggs.com,2014:Post/honesty-and-artificial-intelligence2017-01-23T09:00:52-08:002017-01-23T09:00:52-08:00Honesty and Artificial Intelligence<p>Support we create an artificial intelligence capable of producing a logical, functional proof for some claim about the physical world. Such an AI would need to have first modeled enough language to understand our messy world in recognizable terms. It would further need to know enough to propose statements about our world, and need to grasp enough logic to derive new statements from given statements and rules.</p>
<p>Assume that the AI mechanistically produces natural language proofs, and that its skills and reasoning do not translate to other domains - that it has not sufficiently generalized its understanding for us to consider it sentient. Machine learning tools could potentially produce such an AI, and given the limitations placed on it, we could decide that such an AI lacks higher intelligence, and is therefore a tool of its user. The user, after all, must formulate an appropriate context for the AI to produce a meaningful proof.</p>
<p>Now consider the possibility that we ask the AI to prove the validity of the statement “rational agents have an ethical obligation to not lie.” We give it certain prepositions, such as from Kantian ethics: “rules, such as the statement in question, should apply universally.”<sup><a href="#footnote-1">[1]</a></sup> A user equipped with this hypothetical tool could possibly provide answers to significant philosophical questions. What if the user decided that one such proof attained sufficient quality to warrant its publication - not necessarily in an academic journal, but perhaps on a blog. Said user decides to publish the proof without explaining its source. In other words, without giving credit to the AI for discovering the proof. Would its publication be honest? Would it be deceitful? What if the proof were trivial? What if it involved substantial legwork?</p>
<p>What if the proof were significant enough to warrant its publication in an academic journal, and the user again opted to take full credit for its discovery? The proof was, after all, discovered by clever application of existing tools. A particularly sentimental carpenter might give credit to their hammer as it contributed to the construction of a house, but this comment would be more humorous than accurate. Moreover, we would not consider the carpenter dishonest if they neglected to recognize the role the hammer played in the house’s construction.</p>
<p>What if the user, in a slightly different context, submits the proof as part of their PhD work, and succeeds in their defense? Now the user has earned significant merit for work they may or may not truly have accomplished.</p>
<p>What role does academic honesty play in the rapidly-approaching world of general AI, where one could clamp the parameters of such AI to yield a mere tool, capable of reason but incapable of demonstrating sentience? Does our definition of sentient or conscious allow for an AI of such utility to be considered mechanical and unaware? Could such limitations even be placed on an AI?</p>
<p><a name="footnote-1"></a>[1] <a href="http://www.csus.edu/indiv/g/gaskilld/ethics/kantian%20ethics.htm">http://www.csus.edu/indiv/g/gaskilld/ethics/kantian ethics.htm</a></p>
tag:blog.eliskeggs.com,2014:Post/time-representations-and-decimal-years2016-02-22T13:06:10-08:002016-02-22T13:06:10-08:00Time Representations and Decimal Years<p>Titles are cool.</p>
<p>I wanted to represent a timespan in terms of decimal years, for no apparent reason. This isn’t the most interesting thing I have to talk about, but in this “era”* of political correctness, one can’t even be politically correct without someone calling you out on it. Yeah, I’m taking the easy way out.</p>
<p>Anyway, I noticed that there’s a variety of ways to calculate this timespan, specifically the non-integer portion. As always, there’s a naïve way to compute the entire number, namely calculate the difference in milliseconds (or some similarly small unit of time), and divide by the number of milliseconds in a year. How many milliseconds are in a year? That’s a silly question, because years don’t have a constant length. We could use the average, but we’d generally be off.</p>
<p>So we know the root issue is that years have a non-constant length. What does a decimal year represent, then? Just like everything else about our measurement of time, it’s an arbitrary representation. I think it makes the most sense to make the representation continuous - if my decimal year clock says “3.5” and I wait half of this year, it should say “4.0,” and every moment of time should be a continuous and linear representation of those two points in time.</p>
<p>So I’ve established something meaningless here, because that doesn’t get us any closer to an answer. Because the decision is meaningless, here are a few possibilities for calculating the decimal: using average length of a year, using the length of the current year, using the length of the destination year, using a combination of the current and destination years, or using the average/combination lengths of the years between the current and destination years (inclusively or exclusively).</p>
<p>I ended up deciding on the fourth option - using a combination of the current and destination years. First, convert the dates into their absolute decimal years, then take the difference of those decimals.</p>
<pre><code class="prettyprint lang-js">// date must be a valid date object
function getDecimalYear(date) {
var year = date.getFullYear(), start = +new Date(year, 0);
return year + (date - start) / (new Date(year + 1, 0) - start);
}
function getDecimalAge(birth) {
var birthDate = new Date(birth);
if (isNaN(birthDate)) return null;
return getDecimalYear(new Date()) - getDecimalYear(birthDate);
}
</code></pre>
<p>*because there’s an era for everything</p>
<h2 id="edit_2">
<a class="head_anchor" href="#edit_2"> </a>Edit</h2>
<p>I’ve actually changed my mind, and am opting to use the following:</p>
<pre><code class="prettyprint lang-js">// precondition: start and end are Date objects
function getDecimalDiff(start, end) {
var mostRecent = new Date(start), endYear = end.getFullYear();
mostRecent.setFullYear(endYear);
if (mostRecent &gt; end) mostRecent.setFullYear(endYear -= 1);
var subsequent = new Date(mostRecent);
subsequent.setFullYear(endYear + 1);
return (endYear - start.getFullYear()) + (end - mostRecent) / (subsequent - mostRecent);
}
</code></pre>
tag:blog.eliskeggs.com,2014:Post/databases2014-11-16T10:40:52-08:002014-11-16T10:40:52-08:00Databases<p>Our databases are inflexible. Our databases are designed for specific tasks, even if they’re intended to be general purpose. They make decisions for us, choosing how consistency, availability, and partition tolerance fit together. By design, we first select our databases around the data we want to store, rather than basing our decision on their maturity and features.</p>
<p>Normalized databases lend themselves to many different kinds of data, but rigidly enforce a strong consistency policy. Denormalized databases generally relinquish consistency in favor of availability. Some more special-use data stores like <a href="http://redis.io">Redis</a> prefer consistency and pure data structures, but ultimately don’t scale well, and sacrifice durability in a wild dash for raw speed.</p>
<p>We need a database that gets out of our way, and provides the flexibility we need to get the job done, along the way minimizing resources spent on developing with a slew of databases, and subsequently managing them in production. We need a database that gives us exactly enough control over consistency, availability, and partition tolerance, and one that allows us to choose how they fit together.</p>
<p>We need choose what sets of data are versioned, what sets are strongly consistent, and what sets use CRDTs for availability. Some data, like configuration data, needs to be highly available for reads, but should have consistent writes. Some data needs to scale efficiently with number of objects, to the point that it needs automatic warehousing. Some data needs complex enough reporting that it needs to roll up into summarized records automatically, while other data needs implicit two-phase commits. We shouldn’t have to implement all these strategies at the application level, and we shouldn’t have to implement them over and over again.</p>
<p>We need a better database.</p>
tag:blog.eliskeggs.com,2014:Post/security2014-11-01T10:59:13-07:002014-11-01T10:59:13-07:00Security and Passwords<p>Security is hard, reflected by the increasing number of security breaches at high-profile services. Most services use a username and password authentication scheme. The username represents identity, and the password verifies that identity. Developers and consumers alike find passwords difficult to manage. Developers struggle to build systems which securely handle and store passwords, while consumers fail to create sufficiently memorable and random passwords.</p>
<p>There has to be a better way.</p>
<p>However, if we find a better way to identify and authenticate users, it will take time for most services to catch on. In the meantime, how do we create better passwords? The best passwords should roll off the fingers much like an elegant word rolls off the tongue. We humans are good at optimizing movement, provided the movement can be optimized, so why not use that knowledge to create better passwords?</p>
<p>I want to create a password that minimizes wasted energy while typing, accounting for modifier keys. A password which, as a human, I can remember easily. The solution Randall Munroe proposed <a href="http://xkcd.com/936">over at xkcd</a> is a great solution to the memorability problem, but many services have an arbitrary constraint on maximum password length.</p>
<p>As consumers, we don’t want the hassle of managing passwords and making them secure. We turn to password managers to generate and store our passwords. We get frustrated when the experience is still clunky and time consuming. When we have to unlock our password manager with a password. We think, <em>wasn’t this supposed to eliminate the need for passwords</em>? Password managers are a solution that works well enough for most of our use-cases. They also ensure that if one service is breached, the rest of our services remain secure by virtue of having unique passwords for each service.</p>