Category Archives: Java

Phil 12.14.17

7:00 – ASRC MKT


Phil 12.13.17

7:00 – 5:00 ASRC MKT

  • Schedule physical
  • Write up fire stampede. Done!
  • Continuing Consensus and Cooperation in Networked Multi-Agent Systems here
  • Would like to see how the credibility cues on the document were presented. What went right and what went wrong: Schumer calls cops after forged sex scandal charge
  • Finished linking the RB components to the use cases. Waiting on Aaron to finish SIGINT use case
  • Working on building maps from trajectories. Trying
    • Updating Labeled2DMatrix to read in string values. I had never finished that part! There are some issues with what to do about column headers. I think I’m going to add explicit headers for the ‘Trajectory’ sheet
  • Strategized with Aaron about how to approach the event tomorrow. And Deep Neural Network Capsules. And Social Gradient Descent Agents.
    • deep neural nets learn by back-propagation of errors over the entire network. In contrast real brains supposedly wire neurons by Hebbian principles: “units that fire together, wire together”. Capsules mimic Hebbian learning in the way that: “A lower-level capsule prefers to send its output to higher level capsules whose activity vectors have a big scalar product with the prediction coming from the lower-level capsule”
      • Sure sounds like oscillator frequency locking / flocking to me……

Phil 12.12.17

7:00 – 3:30 ASRC MKT

  • Need to make sure that an amplified agent also has amplified influence in calculating velocity – Fixed
  • Towards the end of this video is an interview with Ian Couzin talking about how mass communication is disrupting our ability to flock ‘correctly’ due to the decoupling of distance and information
  • Write up fire stampede. Backups everywhere, one hole, antennas burn so the AI keeps trust in A* but loses awareness as the antennas burn: “The Los Angeles Police Department asked drivers to avoid navigation apps, which are steering users onto more open routes — in this case, streets in the neighborhoods that are on fire.” [LA Times] Also this slow motion version of the same thing: For the Good of Society — and Traffic! — Delete Your Map App
  • First self-driving car ‘race’ ends in a crash at the Buenos Aires Formula E ePrix; two cars enter, one car survives
  • Taking a closer look at Oscillator Models and Collective Motion (178 Citations) and Consensus and Cooperation in Networked Multi-Agent Systems (6,291 Citations)
  • Consensus and Cooperation in Networked Multi-Agent Systems
    • Reza Olfati-SaberAlex Fax, and Richard M. Murray
    • We discuss the connections between consensus problems in networked dynamic systems and diverse applications including synchronization of coupled oscillators, flocking, formation control, fast consensus in small world networks, Markov processes and gossip-based algorithms, load balancing in networks, rendezvous in space, distributed sensor fusion in sensor networks, and belief propagation. We establish direct connections between spectral and structural properties of complex networks and the speed of information diffusion of consensus algorithms (Abstract)
    • In networks of agents (or dynamic systems), “consensus” means to reach an agreement regarding a certain quantity of interest that depends on the state of all agents. A “consensus algorithm” (or protocol) is an interaction rule that specifies the information exchange between an agent and all of its (nearest) neighbors on the network (pp 215)
      • In my work, this is agreement on heading and velocity
    • Graph Laplacians are an important point of focus of this paper. It is worth mentioning that the second smallest eigenvalue of graph Laplacians called algebraic connectivity quantifies the speed of convergence of consensus algorithms. (pp 216)
    • More recently, there has been a tremendous surge of interest among researchers from various disciplines of engineering and science in problems related to multi-agent networked systems with close ties to consensus problems. This includes subjects such as consensus [26]–[32], collective behavior of flocks and swarms [19], [33]–[37], sensor fusion [38]–[40], random networks [41], [42], synchronization of coupled oscillators [42]–[46], algebraic connectivity of complex networks [47]–[49], asynchronous distributed algorithms [30], [50], formation control for multi-robot systems [51]–[59], optimization-based cooperative control [60]–[63], dynamic graphs [64]–[67], complexity of coordinated tasks [68]–[71], and consensus-based belief propagation in Bayesian networks [72], [73]. (pp 216)
      • That is a dense lit review. How did they order it thematically?
    • A byproduct of this framework is to demonstrate that seemingly different consensus algorithms in the literature [10], [12]–[15] are closely related. (pp 216)
    • To understand the role of cooperation in performing coordinated tasks, we need to distinguish between unconstrained and constrained consensus problems. An unconstrained consensus problem is simply the alignment problem in which it suffices that the state of all agents asymptotically be the same. In contrast, in distributed computation of a function f(z), the state of all agents has to asymptotically become equal to f(z), meaning that the consensus problem is constrained. We refer to this constrained consensus problem as the f-consensus problem. (pp 217)
      • Normal exploring/flocking/stampeding is unconstrained. Herding adds constraint, though it’s dynamic. The variables that have to be manipulated in the case of constraint to result in the same amount of consensus are probably what’s interesting here. Examples could be how ‘loud’ does the herder have to be? Also, how ‘primed’ does the population have to be to accept herding?
    • …cooperation can be informally interpreted as “giving consent to providing one’s state and following a common protocol that serves the group objective.” (pp 217)
    • Formal analysis of the behavior of systems that involve more than one type of agent is more complicated, particularly, in presence of adversarial agents in noncooperative games [79], [80]. (pp 217)
    • The reason matrix theory [81] is so widely used in analysis of consensus algorithms [10], [12], [13], [14], [15], [64] is primarily due to the structure of P in (4) and its connection to graphs. (pp 218)
    • The role of consensus algorithms in particle based flocking is for an agent to achieve velocity matching with respect to its neighbors. In [19], it is demonstrated that flocks are networks of dynamic systems with a dynamic topology. This topology is a proximity graph that depends on the state of all agents and is determined locally for each agent, i.e., the topology of flocks is a state dependent graph. The notion of state-dependent graphs was introduced by Mesbahi [64] in a context that is independent of flocking. (pp 218)
      • They leave out heading alignment here. Deliberate? Or is heading alignment just another variant on velocity
    • Consider a network of decision-making agents with dynamics ẋi = ui interested in reaching a consensus via local communication with their neighbors on a graph G = (V, E). By reaching a consensus, we mean asymptotically converging to a one-dimensional agreement space characterized by the following equation: x1 = x2 = … = x (pp 219)
    • A dynamic graph G(t) = (V, E(t)) is a graph in which the set of edges E(t) and the adjacency matrix A(t) are time-varying. Clearly, the set of neighbors Ni(t) of every agent in a dynamic graph is a time-varying set as well. Dynamic graphs are useful for describing the network topology of mobile sensor networks and flocks [19]. (pp 219)
    • GraphLaplacianGradientDescent(pp 220)
  • Not sure about this one. It just may be another set of algorithms to do flocking. Maybe some network implications? Flocking for Multi-Agent Dynamic Systems: Algorithms and Theory. It is one of the papers that the Consensus and Cooperation paper above leans on heavily though…
  • The Emergence of Consensus: A Primer
    • The origin of population-scale coordination has puzzled philosophers and scientists for centuries. Recently, game theory, evolutionary approaches and complex systems science have provided quantitative insights on the mechanisms of social consensus. However, the literature is vast and scattered widely across fields, making it hard for the single researcher to navigate it. This short review aims to provide a compact overview of the main dimensions over which the debate has unfolded and to discuss some representative examples. It focuses on those situations in which consensus emerges ‘spontaneously’ in absence of centralised institutions and covers topic that include the macroscopic consequences of the different microscopic rules of behavioural contagion, the role of social networks, and the mechanisms that prevent the formation of a consensus or alter it after it has emerged. Special attention is devoted to the recent wave of experiments on the emergence of consensus in social systems.
  • Critical dynamics in population vaccinating behavior
    • Complex adaptive systems exhibit characteristic dynamics near tipping points such as critical slowing down (declining resilience to perturbations). We studied Twitter and Google search data about measles from California and the United States before and after the 2014–2015 Disneyland, California measles outbreak. We find critical slowing down starting a few years before the outbreak. However, population response to the outbreak causes resilience to increase afterward. A mathematical model of measles transmission and population vaccine sentiment predicts the same patterns. Crucially, critical slowing down begins long before a system actually reaches a tipping point. Thus, it may be possible to develop analytical tools to detect populations at heightened risk of a future episode of widespread vaccine refusal.
  • For Aaron’s Social Gradient Descent Agent research (lit review)
    • On distributed search in an uncertain environment (Something like Social Gradient Descent Agents)
      • The paper investigates the case where N agents solve a complex search problem by communicating to each other their relative successes in solving the task. The problem consists in identifying a set of unknown points distributed in an n–dimensional space. The interaction rule causes the agents to organize themselves so that, asymptotically, each agent converges to a different point. The emphasis of this paper is on analyzing the collective dynamics resulting from nonlinear interactions and, in particular, to prove convergence of the search process.
    • A New Clustering Algorithm Based Upon Flocking On Complex Network (Sizing and timing for flocking systems seems to be ok?)
      • We have proposed a model based upon flocking on a complex network, and then developed two clustering algorithms on the basis of it. In the algorithms, firstly a k-nearest neighbor (knn) graph as a weighted and directed graph is produced among all data points in a dataset each of which is regarded as an agent who can move in space, and then a time-varying complex network is created by adding long-range links for each data point. Furthermore, each data point is not only acted by its k nearest neighbors but also r long-range neighbors through fields established in space by them together, so it will take a step along the direction of the vector sum of all fields. It is more important that these long-range links provides some hidden information for each data point when it moves and at the same time accelerate its speed converging to a center. As they move in space according to the proposed model, data points that belong to the same class are located at a same position gradually, whereas those that belong to different classes are away from one another. Consequently, the experimental results have demonstrated that data points in datasets are clustered reasonably and efficiently, and the rates of convergence of clustering algorithms are fast enough. Moreover, the comparison with other algorithms also provides an indication of the effectiveness of the proposed approach.
  • Done with the first draft of the white paper! And added the RFP section to the LMN productization version
  • Amazon Sage​Maker: Amazon SageMaker is a fully managed machine learning service. With Amazon SageMaker, data scientists and developers can quickly and easily build and train machine learning models, and then directly deploy them into a production-ready hosted environment. It provides an integrated Jupyter authoring notebook instance for easy access to your data sources for exploration and analysis, so you don’t have to manage servers. It also provides common machine learning algorithms that are optimized to run efficiently against extremely large data in a distributed environment. With native support for bring-your-own-algorithms and frameworks, Amazon SageMaker offers flexible distributed training options that adjust to your specific workflows. Deploy a model into a secure and scalable environment by launching it with a single click from the Amazon SageMaker console. Training and hosting are billed by minutes of usage, with no minimum fees and no upfront commitments. (from the documentation)

4:00 – 5:00 Meeting with Aaron M. to discuss Academic RB wishlist.

Phil 11.17.17

7:00 – ASRC MKT

  • Reuters Tracer: Toward Automated News Production Using Large Scale Social Media Data
    • To deal with the sheer volume of information and gain competitive advantage, the news industry has started to explore and invest in news automation. In this paper, we present Reuters Tracer, a system that automates end-to-end news production using Twitter data. It is capable of detecting, classifying, annotating, and disseminating news in real time for Reuters journalists without manual intervention. In contrast to other similar systems, Tracer is topic and domain agnostic. It has a bottom-up approach to news detection, and does not rely on a predefined set of sources or subjects. Instead, it identifies emerging conversations from 12+ million tweets per day and selects those that are news-like. Then, it contextualizes each story by adding a summary and a topic to it, estimating its newsworthiness, veracity, novelty, and scope, and geotags it. Designing algorithms to generate news that meets the standards of Reuters journalists in accuracy and timeliness is quite challenging. But Tracer is able to achieve competitive precision, recall, timeliness, and veracity on news detection and delivery. In this paper, we reveal our key algorithm designs and evaluations that helped us achieve this goal, and lessons learned along the way.
  • Maybe the adjacency matrix that we think we can produce from the trajectories can be used as the basis for a self-organizing map?
  • Gobo: TL;DR: This is a MIT research project to study how people filter their social media feeds. We are tracking your use of the site, but will only publish it anonymously and in aggregate. We might follow up with you to hear more about what you think about Gobo. The MIT Institutional Review Board has approved of this study. Gobo
  • This, plus , makes me think that MIT may be starting to focus on these issues.
  • Back to The Group Polarization Phenomenon
    •  David G. Myers
    • Pictures may be important as part of an argument. Need to be able to support that.
    • This polarization concept should also be distinguished from a related concept, extremization. Whereas polarization refers to shifts toward the already preferred pole, extremization has been used to refer to movement away from neutrality, regardless of direction. Since all instances of group polarization are instances of extremization, but not vice versa, extremization may be easier to demonstrate than polarization. (pp 603)
    • For convenience we have organized these studies into seven categories: attitudes, jury decisions, ethical decisions, judgments, person perceptions, negotiation behavior, and risk measures other than the choice dilemmas. This categorization is admittedly somewhat arbitrary. (pp 604)
    • In other studies, however, it is possible to infer the direction of initial preferences. Robinson (1941) conducted lengthy discussions of two attitudes. On attitude toward war, where students were initially quite pacifistic, there was a nonsignificant shift to even more pacifism following discussion. On attitude toward capital punishment, to which students were initially opposed, there was a significant shift to even stronger opposition. (pp 604)
    • Varying the stimulus materials. Myers and Kaplan (1976) engaged their subjects in discussion of stimulus materials which elicited a dominant predisposition of guilty or not guilty. After discussing traffic cases in which the defendants were made to appear as low in guilt, the Subjects Were even more definite in their judgments of innocence and more lenient in recommended punishment. After discussing “high-guilt” cases, the subjects polarized toward harsher judgments of guilt and punishment. (pp 605)
    • Group composition studies. Vidmar composed groups of jurors high or low in dogmatism. The high-dogmatism juries shifted toward harsher sentences following discussion, and the low-dogmatism groups shifted toward more lenient sentences, despite the fact that the high- and low-dogmatism juries did not differ in their predeliberation judgments. (pp 606)
    • Main and Walker (1973) observed that these constitutionality decisions were also more libertarian in the group condition (65% versus 45%). Although a minority of the single-judge decisions were prolibertarian, Walker and Main surmised that the preexisting private values of the judges were actually prolibertarian and that their decisions made alone were compromised in the face of antilibertarian public pressure. Their private values were then supposedly released and reinforced in the professional group context (pp 606)
    • From what we have been able to perceive thus far, the process is an interesting combination of rational persuasion, sheer social pressure, and the psychological mechanism by which individual perceptions undergo change when exposed to group discussion (pp 606)
    • Myers (1975) also used a faculty evaluation task. The subjects responded to 200 word descriptions of “good” or “bad” faculty with a scale judgment and by distributing a pay increase budget among the hypothetical faculty. As predicted by the group polarization hypothesis, good faculty were rated and paid even more favorably after the group interaction, and contrariwise for the bad faculty. (pp 608)
    • in general, the work on person perception supports the group polarization hypothesis, especially when the stimulus materials are more complex than just a single adjective. (pp 608)
    • Myers and Bach (1976) compared the conflict behavior of individuals and groups, using an expanded prisoner’s dilemma matrix cast in the language of a gas war. There was no difference in their conflict behavior (both individuals and groups were highly noncooperative). But on postexperimental scales assessing the subjects’ evaluations of themselves and their opponents, individuals tended to justify their own behavior, and groups were even more inclined toward self-justification. This demonstration of group polarization supports Janis’s (1972) contention that in situations of intergroup conflict, group members are likely to develop a strengthened belief in the inherent morality of their actions.  (pp 608)
    • Skewness cannot account for group polarization. This is particularly relevant to the majority rule scheme, which depends on a skewed distribution of initial choices. On choice dilemmas, positively skewed distributions (i.e., with a risky majority) should produce risky shift, and negatively skewed distributions should yield a conservative shift. Several findings refute this prediction. (pp 612)
    • Shifts in the group median, although slightly attenuated, are not significantly smaller than shifts in the group mean (pp 612)
    • Group shift has also been shown to occur in dyads (although somewhat reduced), where obviously there can be no skewness in the initial responses (pp 612)
    • while group decision models may be useful in other situations in which discussion is minimal or absent and the task is to reach agreement (e.g., Lambert, 1969), the models (or at least the majority rule model stressed in this analysis) are not a sufficient explanation of the group polarization findings we are seeking to explain. There are still a variety of other decision schemes that can be explored and with other specific tasks. But clearly, group induced shift on choice dilemmas is something more than a statistical artifact. (pp 612)
    • Interpersonal Comparisons theory suggests that a subject changes when he discovers that others share his inclinations more than he would have supposed, either because the group norm is discovered to be more in the preferred direction than previously imagined or because the subject is released to more strongly act out his preference after observing someone else who models it more extremely than himself. This theory, taken by itself, suggests that relevant new information which emerges during the discussion is of no consequence. Group polarization is a source effect, not a message effect. (pp 614)
      • This is very close to the flocking theory where one agent looks at the alignment and velocity of nearby agents.
    • Differences between self, presumed other, and ideal scores. One well-known and widely substantiated assumption of the interpersonal comparisons approach is the observation from choice-dilemmas research that if, after responding, the subjects go back over the items and guess how their average peer would respond and then go back over the items a third time and indicate what response they would actually admire most, they tend to estimate the group norm as more neutral than their own initial response and their ideal as more extreme (pp 613)
    • Lamm et al. (1972) have also shown that not only do subjects indicate their ideal as more extreme than their actual response, but they also suspect that the same is true of their peers. The tendency of people to perceive themselves as more in what they consider to be the socially desirable direction than their average peer extends beyond the choice dilemmas (see Codol, Note 13). For example, most businessmen believe themselves to be more ethical than the average businessman (Baumhart, 1968), and there is evidence that people perceive their own views as less prejudiced than the norm of their community (Lenihan, Note 14). (pp 613)
    • The tendency to perceive others as “behind” oneself exists only when the self response is made prior to estimating the group norm (McCauley, Kogan, & Teger, 1971; Myers, 1974). Evidently it is after one has decided for himself that there is then a tendency to consider one’s action as relatively admirable (by perceiving the average person as less admirable than oneself). (pp 613)
    • it has been reliably demonstrated that subjects perceive other persons who have responded more extremely than themselves (in the direction of their ideal) as more socially desirable than persons who have not (Baron, Monson, & Baron, 1973; Jellison & Davis, 1973; Jellison & Riskind, 1970, 1971; Madaras & Bern, 1968). A parallel finding exists in the attitude literature (Eisinger & Mills, 1968): An extreme communicator on one’s side of an issue tends to be perceived as more sincere and competent than a moderate. (pp 614)
    • Burnstein, Vinokur, and Pichevin (1974) took an informational influence viewpoint and showed that people who adopt extreme choices are presumed to possess cogent arguments and are then presumably admired for their ability. They also demonstrated that subjects have much less confidence in others’ choices than in their own, suggesting that the tendency to perceive others as more neutral than oneself simply reflects ignorance about others’ choices (pp 614)
    • self-ideal difference scores are less affected by order of measurement than self versus perceived other differences (Myers, 1974)—suggest that the self-ideal discrepancy may be the more crucial element of a viable interpersonal comparisons approach. (pp 614)
    • One set of studies has manipulated the information about others’ responses by providing fake norms. More than a dozen separate studies all show that subjects will move toward the manipulated norm (see Myers, 1973) (pp 615)
      • Can’t find this paper, but herding!
    • Consistent with this idea, they observed that exposure to others’ choices produced shift only when subjects then wrote arguments on the item. If knowledge of others’ choices was denied or if an opportunity to rethink the item was denied, no shift occurred. (pp 615)
    • On the other hand, it may be reasoned that in each of the studies producing minimal or nonexistent shift after exposure to others’ attitudes, the subjects were first induced to bind themselves publicly to a pretest choice and then simply exposed to others’ choices. It takes only a quick recall of some classic conformity studies (e.g., Asch, 1956) to realize that this was an excellent procedure for inhibiting response change. (pp 615)
    • Bishop and Myers (1974) have formulated mathematical models of the presumed informational influence mechanisms. These models assume that the amount of group shift will be determined by three factors: the direction of each argument (which alternative it favors), the persuasiveness of each argument, and the originality of each argument (the extent to which it is not already known by the group members before discussion). In discussion, the potency of an argument will be zero if either the rated persuasiveness is zero (it is trivial or irrelevant) or if all group members considered the argument before discussion (pp 616)
    • the simple direction of arguments is such an excellent predictor of shift (without considering persuasiveness and originality), it is not easy to demonstrate the superiority of the models over a simple analysis of argument direction as undertaken by Ebbesen and Bowers (1974). (pp 617)
      • This supports the notion that alignment and heading, as used in the model may really be sufficient to model polarizing behavior
    • A group that is fairly polarized on a particular item before discussion is presumably already in general possession of those arguments which polarize a group. A less extreme group has more to gain from the expression of partially shared persuasive arguments. (pp 617)
    • Passive receipt of arguments outside an interactive discussion context generally produces reduced shift (e.g., Bishop & Myers, 1974; Burnstein & Vinokur, 1973; St. Jean, 1970; St. Jean & Percival, 1974). Likewise, listening to a group discussion generally elicits less shift than actual participation (pp 617)
      • There may be implications here with respect to what’s being seen and read on the news having a lower influence than items that are being discussed on social media. A good questions is at what point does the reception of information feel ‘interactive’? Is clicking ‘like enough? My guess is that it is.
    • Verbal commitment could produce the increased sense of involvement and certainty that Moscovici and Zavolloni (1969) believe to be inherent in group polarization. (pp 618)
      • This reinforces the point above, but we need to know what the minimum threshold of what can be considered ‘verbal commitment’.
    • By offering arguments that tend toward the outer limits of his range of acceptability, the individual tests his ideals and also presents himself favorably to the group since, as we noted earlier, extremity in the direction of the ideal connotes knowledgeability and competence. (pp 618)
    • Diagram (pp 619) PolarazationDiagram
    • Arguments spoken in discussion more decisively favor the dominant alternative than do written arguments. The tendency for discussion arguments to be one-sided is probably not equal for all phases of a given discussion. Studies in speech-communications (see Fisher, 1974) suggest that one-sided discussion is especially likely after a choice direction has implicitly emerged and group members mutually reinforce their shared inclination. (pp 619)
      • This review is pre IRC, and views writing as non-interactive. THis may not be true any more.
    • The strength of the various vectors is expected to vary across situations. In more fact-oriented judgment tasks (group problem solving tasks being the extreme case), the cognitive determinants will likely be paramount, although people will still be motivated to demonstrate their abilities. On matters of social preference, in which the social desirability of actions is more evident, the direct and indirect attitudinal effects of social motivation are likely to appear. The direct impact will occur in situations in which the individual has ideals that may be compromised by presumed norms but in which exposure to others’ positions informs him that his ideals are shared more strongly or widely than he would have supposed. These situations—in which expressed ideals are a step ahead of prior responses—will also tend to elicit discussion content that is biased toward the ideals. (pp 620)
    • What is the extent of small group influence on attitudes? McGuire (1969) noted, “It is clear that any impact that the mass media have on opinion is less than that produced by informal face-to-face communication of the person with his primary groups, his family, friends, co-workers, and neighbors (p. 231,).” (pp 220)
  • Back to Angular
    • Got all of the CRUD functions working and updates the subversion repo
    • Got search running. Finished tutorial!

Phil 11.16.2017

7:00 – ASRC MKT

  • Data & Society to Launch Disinformation Action Lab Supported by Knight Foundation
    • The lab will use research to explore issues such as: how fake news narratives propagate; how to detect coordinated social media campaigns; and how to limit adversaries who are deliberately spreading misinformation. To understand where online manipulation is headed, it will analyze the technology and tactics being used by players at the international and domestic level.This project builds off the ongoing work of the Media Manipulation initiative at Data & Society, which examines how groups use social media and the participatory culture of the internet to spread and amplify misinformation and disinformation. Recent releases from this initiative include Lexicon of Lies and Media Manipulation and Disinformation Online.The funding is part of today’s announcement that the John S. and James L. Knight Foundation is giving $4.5 million in new funding to eight leading organizations working to create more informed and engaged communities through innovative use of technology. The other organizations receiving support include: Code2040, Code for Science & Society, Columbia Journalism School, DocumentCloud, Emblematic Group, HistoryPin and mRelief.
  • Before I restart on The Group Polarization Phenomenon, I’m going to take a look at how much work it would be to add the recording of trajectories through cells by agent.
  • And updates
  • Done! The name incorporates the n-dimensional cell position. In this case it’s 2D
    GreenFlockSh_10: GreenFlock[6, 3], RedFlock[6, 4], GreenFlock[7, 4], GreenFlock[7, 4], GreenFlock[7, 4], RedFlock[8, 4], GreenFlock[8, 5], GreenFlock[8, 5], GreenFlock[8, 5], RedFlock[8, 6], RedFlock[8, 6], RedFlock[8, 6], RedFlock[8, 6], GreenFlock[8, 7], GreenFlock[8, 7], RedFlock[7, 7], RedFlock[7, 7], GreenFlock[7, 8], GreenFlock[7, 8], RedFlock[6, 8], RedFlock[6, 8], RedFlock[6, 8], GreenFlock[5, 8], GreenFlock[5, 8], GreenFlock[5, 8], RedFlock[4, 8], RedFlock[4, 8], RedFlock[4, 8], RedFlock[4, 8], RedFlock[3, 7], RedFlock[3, 7], RedFlock[3, 7], RedFlock[3, 7], GreenFlock[3, 6], GreenFlock[3, 6], GreenFlock[3, 6], RedFlock[3, 5], RedFlock[3, 5], GreenFlock[2, 5], GreenFlock[2, 5], RedFlock[2, 4], RedFlock[2, 4], RedFlock[2, 4], GreenFlock[2, 3], GreenFlock[2, 3], GreenFlock[2, 3], GreenFlock[3, 2], GreenFlock[3, 2], GreenFlock[3, 2], GreenFlock[3, 2], GreenFlock[3, 2], RedFlock[4, 2], GreenFlock[4, 1], GreenFlock[4, 1], RedFlock[5, 1], GreenFlock[5, 2], GreenFlock[5, 2], RedFlock[6, 2], RedFlock[6, 2], RedFlock[6, 2], GreenFlock[6, 3], GreenFlock[6, 3], GreenFlock[6, 3], RedFlock[7, 3], GreenFlock[7, 4], GreenFlock[7, 4], GreenFlock[7, 4], RedFlock[7, 5], RedFlock[7, 5], RedFlock[7, 5], GreenFlock[8, 5], RedFlock[8, 6], RedFlock[8, 6], RedFlock[8, 6], GreenFlock[8, 7], GreenFlock[8, 7], GreenFlock[8, 7], GreenFlock[8, 7], GreenFlock[9, 8], GreenFlock[9, 8], GreenFlock[9, 8], RedFlock[9, 9], RedFlock[9, 9], RedFlock[9, 9], RedFlock[9, 9], RedFlock[9, 9], RedFlock[9, 9], RedFlock[9, 9], GreenFlock[9, 8], GreenFlock[9, 8], GreenFlock[9, 8], GreenFlock[9, 8], GreenFlock[8, 7], GreenFlock[8, 7], GreenFlock[8, 7], GreenFlock[8, 7], RedFlock[7, 7], RedFlock[7, 7], RedFlock[7, 7]
  • Some additional thoughts about building maps from trajectories
    • Incorporating trajectories allows determination of otherwise difficult problems. An example of this is pictures of war crimes. If the trajectory originates in a legal belief space, then it’s evidence to be saved. If it comes from an extremist belief space, it’s propaganda to be deleted.
    • The simplest way to do this is to look at all the trajectories where a landmark is shared. Every item that is adjacent to that landmark on a trajectory must be adjacent in the environment. If we build a graph with the lowest crossing number, we should have our best reconstruction.
    • Time can be an important dimension, and may provide useful information where just sequence may not
    • It is possible, even likely, that the map is not fixed, so the environment should also be allowed to morph over time to support optimal relations. Think of it as agents surfing on a wave. There is an outer frame (the shore) that waves and surfers can’t exist. Within that frame, waves move and follow different rules from surfers. Surfers in turn are influenced by the waves, and in our case, waves may be influenced by the surfers as well as the external environment.
    • Trajectories point both ways. In addition to being able to infer a destination for an agent, it may be possible to infer an origin.
    • Discussing this with Aaron, we realized that it might be possible to build a map by constructing a network from the adjacency of paths. In other words, if one path goes from C1->C2->C3 and another goes from B2->C2->D2, then we know that C2 is adjacent to all those points. That information can be used to build a graph. If the graph can be arranged so that it has a low crossing number, then it should approximate the original map. The (relative) size of the areas could be related to the crossing times averaged out for all agents.
  • And I just found this in Reinforcement Learning : An Introduction (1st edition linked here): ReinforcementLearningPP2
  • Back to Angular
    • Found where the typescript files live on the browser/webpack: FoundTheFiles
    • Got routes working, with minimal confusion. The framework generates a lot of code though…
    • To get npm install angularinmemorywebapi save to install something visible for the IDE, I had to add the -g option. Still got weird errors though: 
      D:\Development\Sandboxes\TourOfHeroes>npm install angular-in-memory-web-api --save -g
      npm WARN angular-in-memory-web-api@0.5.1 requires a peer of @angular/common@>=2.0.0 <6.0.0 but none is installed. You must install peer dependencies yourself. npm WARN angular-in-memory-web-api@0.5.1 requires a peer of @angular/core@>=2.0.0 <6.0.0 but none is installed. You must install peer dependencies yourself. npm WARN angular-in-memory-web-api@0.5.1 requires a peer of @angular/http@>=2.0.0 <6.0.0 but none is installed. You must install peer dependencies yourself.
      npm WARN angular-in-memory-web-api@0.5.1 requires a peer of rxjs@^5.1.0 but none is installed. You must install peer dependencies yourself.
    • Here’s how you generate a service
      ng generate service in-memory-data --flat --module=app


Phil 11.8.17

ASRC MKT 7:00 – 5:00, with about two hours for personal time

  • After the fall of DNAinfo, it’s time to stop hoping local news will scale
    • I think people understand that this sensation of unreality has a lot to do with the platforms that deliver our news, because Facebook and Google package journalism and bullshit identically. But I’d argue that it also has a lot to do with the death of local news to a degree few of us recognize.
    • This is not unheard of in digital local news: People pay to drink with the investigative reporters at The Lens in New Orleans and to watch Steelers games with the staff of The Incline in Pittsburgh.
  • And as a counterbalance: Weaken from Within
    • The turtle didn’t know and never will, that information warfare — it is the purposeful training of an enemy on how to remove its own shell.
  • Rescuing Collective Wisdom when the Average Group Opinion Is Wrong
    • Yet the collective knowledge will remain inaccessible to us unless we are able to find efficient knowledge aggregation methods that produce reliable decisions based on the behavior or opinions of the collective’s members.
    • Our analysis indicates that in the ideal case, there should be a matching between the aggregation procedure and the nature of the knowledge distribution, correlations, and associated error costs. This leads us to explore how machine learning techniques can be used to extract near-optimal decision rules in a data-driven manner.
  • Inferring Relations in Knowledge Graphs with Tensor Decompositions
  • From today’s Pulse of the Planet episode:
    • Colin Ellard is a cognitive neuroscientist and the author of Places of the Heart: the Psychogeography of Everyday Life. He says that the choices we make in siting a house or even where we choose to sit in a crowded room give us clues about the way humans have evolved.  The idea of prospect and refuge is an inherently biological idea. It goes back through the history of human beings. In fact for any kind of animal selecting a habitat, kind of the holy grail of good habitat choice can be summed up by the principal of seeing but not being seen.
      Ideally what we want is a set of circumstances where we have some protection, visual protection, in the sense of not being able to be easily located ourselves, and that’s Refuge. But we also want to be able to know what’s going on around us. We need to be able to see out from wherever that refuge is. And that’s Prospect. The operation of our preference for situations that are high in both refuge and prospect is something that cuts across everything we build or everywhere we find ourselves.
  • So, prospect-refuge theory sounds interesting. It seems to come from psychology rather than ecology-related fields. Still, it’s a discussion of affordances. Searching around, I found this: Methodological characteristics of research testing prospect–refuge theory: a comparative analysis. Couldn’t get it directly, so I’m trying ILL.
    • Prospect–refuge theory proposes that environments which offer both outlook and enclosure provoke not only feelings of safety but also of spatially derived pleasure. This theory, which was adopted in environmental psychology, led Hildebrand to argue for its relevance to architecture and interior design. Hildebrand added further spatial qualities to this theory – including complexity and order – as key measures of the environmental aesthetics of space. Since that time, prospect–refuge theory has been associated with a growing number of works by renowned architects, but so far there is only limited empirical evidence to substantiate the theory. This paper analyses and compares the methods used in 30 quantitative attempts to examine the validity of prospect–refuge theory. Its purpose is not to review the findings of these studies, but to examine their methodological bases and biases and comment on their relevance for future research in this field.
    • This is the book by Hildebrand: The Wright Space: Patterns and Meaning in Frank Lloyd Wright’s Houses. Ordered.
  • Ok, back to Angular2
    • Done with chapter 3.

Phil 11.7.17

7:00 – 6:00 ASRC MKT

  • Renting a spec Miata at Summit Point 
  • This is really good: The Human Strategy A Conversation With Alex “Sandy” Pentland [10.30.17]
    • Human behavior is determined as much by the patterns of our culture as by rational, individual thinking. These patterns can be described mathematically, and used to make accurate predictions. We’ve taken this new science of “social physics” and expanded upon it, making it accessible and actionable by developing a predictive platform that uses big data to build a predictive, computational theory of human behavior.
  • Rerunning the DTW with the selected agent weight being the specified weight rather than scaled by the distance from the angle so that it matches better the RANDOM_AGENT and the RANDOM_AGENTS settings.
  • Ok, here’s the results. The relationships between the populations appears more consistent, but that could be normal variability. Time for some true statistics to see if these are actually distinct populations. I can also increase power by doing more runs. Possibly also increasing the population size, though there might be confounding effects. DTWEqualWeight
  • Pandas can read in a specific Excel sheet and numpy can run bootstrap on DataFrames, so I can automate the analysis. Going to talk to Aaron first, since he might be the one to go down this road.
  • I think the next step is to start on the UI for the polarization game. Angular?
      • Installing NodeJS
      • npm install -g @angular/cli -> added 968 packages in 56.599s. That is a lot of packages. The IntelliJ plugin seems to be working, the @angular/cli package is visible: NodeNPM
      • Creating a new project is reasonable NewAngularProject
      • Once the project is running, the way to compile and run seems to be to run ng serve –open in the IntelliJ terminal (Note: When running as non-admin, do this in a terminal with admin privileges). It then does a whole bunch of things when a code change is made:
        ** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
         10% building modules 8/10 modules 2 active ...\PolarizationGameOneUI\src\styles.csswebpack: wait until bundle finished: /                                                              Date: 2017-11-07T15:50:25.164Z
        Hash: b3174f5198d14bdc05ac
        Time: 4708ms
        chunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered]
        chunk {main} main.bundle.js (main) 20.8 kB [initial] [rendered]
        chunk {polyfills} polyfills.bundle.js (polyfills) 553 kB [initial] [rendered]
        chunk {styles} styles.bundle.js (styles) 33.8 kB [initial] [rendered]
        chunk {vendor} vendor.bundle.js (vendor) 7.02 MB [initial] [rendered]
        webpack: Compiled successfully.
        webpack: Compiling...
        Date: 2017-11-07T15:51:07.132Z
        Hash: 7b89b5a301e4a411e92d
        Time: 703ms
      • Everything is then sent to localhost:4200/, so all the browser debuggers are available
      • RunningAngular
      • And you can change the picture in the app.component.html file. re-renders on the fly. Pretty nifty. Yep verified:The ng serve command builds the app, starts the development server, watches the source files, and rebuilds the app as you make changes to those files.The --open flag opens a browser to http://localhost:4200/.
      • Pleasantly, if the install fails, ng serve –open will complete the install nd then start the server.
      • Added the ‘heroes’ component: AngularCLI AngularComponent
      • Then I got this error message:
        ERROR in src/app/heroes/heroes.component.ts(7,18): error TS2304: Cannot find name 'ViewEncapsulation'.
      • Turns out that I had to add ViewEncapsulation to the imports in heroes.components:
        import {Component, OnInit, ViewEncapsulation} from '@angular/core';
          selector: 'app-heroes',
          templateUrl: './heroes.component.html',
          styleUrls: ['./heroes.component.css'],
          encapsulation: ViewEncapsulation.None
        export class HeroesComponent implements OnInit {
          constructor() { }
          ngOnInit() {

        Once added in, the rebuild happened and everything functioned normally. Correct error message in the IDE and everything!

  • Talked to Aaron about next steps with the herding data. We need to do something with NNs, and this could be a good fit
  • And now I have a nice little certificate of candidacy!

Phil 11.6.17

7:00 – 4:00 ASRC MKT

  • Going to try a batch job that runs the sim on a single population with a .2 radius and see if I can see a difference between the behaviors using DTW.
  • I had created a few bugs with changing the names of the flocks to Red and Green. Also, I had never run in batch mode with StorageAndRetreival. And calculations for an average center don’t work when there are no members of your flock. So fixing bugs.
  • First set of outputs from the batch jobs. Here’s the headings: HerdingHeadings
  • And here’s the DTW for the same settings (smaller stage though for proportionally greater differences): HerdingDTW
  • The first really obvious thing it that NoHerding is distinct from the other settings, which are more like echo chambers. Groupings tighten up as the radius increases, and the average heading approach may be statistically better than the random agents, but not by much. Lastly, RANDOM_AGENTS and RANDOM_AGENT lie on a continuum. As the switch between each agent takes longer, the more AGENTS will start to look like AGENT.

Phil 11.3.17

7:00 – ASRC MKT

  • Good comments from Cindy on yesterday’s work
  • Facebook’s 2016 Election Team Gave Advertisers A Blueprint To A Divided US
  • Some flocking activity? AntifaNov4
  • I realized that I had not added the herding variables to the Excel output. Fixed.
  • DINH Q. LÊ: South China Sea Pishkun
    • In his new work, South China Sea Pishkun, Dinh Q. Lê references the horrifying events that occurred on April 30th 1975 (the day Saigon fell) as hundreds of thousands of people tried to flee Saigon from the encroaching North Vietnamese Army and Viet Cong. The mass exodus was a “Pishkun” a term used to describe the way in which the Blackfoot American Indians would drive roaming buffalo off cliffs in what is known as a buffalo jump.
  • Back to writing – got some done, mostly editing.
  • Stochastic gradient descent with momentum
  • Referred to in this: There’s No Fire Alarm for Artificial General Intelligence
    •  AlphaGo did look like a product of relatively general insights and techniques being turned on the special case of Go, in a way that Deep Blue wasn’t. I also updated significantly on “The general learning capabilities of the human cortical algorithm are less impressive, less difficult to capture with a ton of gradient descent and a zillion GPUs, than I thought,” because if there were anywhere we expected an impressive hard-to-match highly-natural-selected but-still-general cortical algorithm to come into play, it would be in humans playing Go.
  • In another article: The AI Alignment Problem: Why It’s Hard, and Where to Start
    • This is where we are on most of the AI alignment problems, like if I ask you, “How do you build a friendly AI?” What stops you is not that you don’t have enough computing power. What stops you is that even if I handed you a hypercomputer, you still couldn’t write the Python program that if we just gave it enough memory would be a nice AI.
    • I think this is where models of flocking and “healthy group behaviors” matters. Explore in small numbers is healthy – it defines the bounds of the problem space. Flocking is a good way to balance bounded trust and balanced awareness. Runaway echo chambers are very bad. These patterns are recognizable, regardless of whether they come from human, machine, or bison.
  • Added contacts and invites. I think the DB is ready: polarizationgameone
  • While out riding, I realized what I can do to show results in the herding paper. There are at least three ways to herd:
    1. No herding
    2. Take the average of the herd
    3. Weight a random agent
    4. Weight random agents (randomly select an agent and leave it that way for a few cycles, then switch
  • Look at the times it takes for these to converge and see which one is best. Also look at the DTW to see if they would be different populations.
  • Then re-do the above for the two populations inverted case (max polarization)
  • Started to put in the code changes for the above. There is now a combobox for herding with the above options.

Phil 11.2.17

ASRC MKT 7:00 – 4:30

  • Add a switch to the GPM that makes the adversarial herders point in opposite directions, based on this: Russia organized 2 sides of a Texas protest and encouraged ‘both sides to battle in the streets’
  • It’s in and running. Here’s a screenshot: 2017-11-02 There are some interesting things to note. First, the vector is derived from the average heading of the largest group (green in this case). This explains why the green agents are more tightly clustered than the red ones. In the green case, the alignment is intrinsic. In the red case, it’s extrinsic. What this says to me is that although adversarial herding works well when amplifying the heading already present, it is not as effective when enforcing a heading that does not already predominant. That being said, when we have groups existing in opposition to each other, that is a tragically easy thing to enhance.
  • Hierarchical Representations for Efficient Architecture Search
    • We explore efficient neural architecture search methods and present a simple yet powerful evolutionary algorithm that can discover new architectures achieving state of the art results. Our approach combines a novel hierarchical genetic representation scheme that imitates the modularized design pattern commonly adopted by human experts, and an expressive search space that supports complex topologies. Our algorithm efficiently discovers architectures that outperform a large number of manually designed models for image classification, obtaining top-1 error of 3.6% on CIFAR-10 and 20.3% when transferred to ImageNet, which is competitive with the best existing neural architecture search approaches and represents the new state of the art for evolutionary strategies on this task. We also present results using random search, achieving 0.3% less top-1 accuracy on CIFAR-10 and 0.1% less on ImageNet whilst reducing the architecture search time from 36 hours down to 1 hour.
  • Continuing with the schema. Here’s where we are today: polarizationgameone

Phil 10.30.17

7:00 – 4:30 ASRC MKT

  • The discussion and conclusion
  • Tweaked the “Future Work” section of the CHIIR DC proposal to reflect the herding work. More words means less bullet points!
  • Updated Java and XAMMP on my home machine
  • Pointed the IDE at the correct places
  • I don’t think I have PhpInspections (EA Extended) installed at work? It does nice things – Have it now
  • Working through creating a strawman game. Having some issues with a one-to-many relationship with RedBeanPHP. Ah – it’s because you have to sync the beans. I think rather than have a game point at all the players, I’ll have the players point at the scenario, and the chat messages point at the game and players.
  • Got that mostly working, but having a null player issues
  • Important PHP issue – arrays don’t need to start at zero! The bean arrays are indexed with respect to their db id!
  • Meeting with Wayne
  • The DC is good to submit
  • Start working on a JCMC article that connects the flocking model to qualitative theory.
  • Keep on working on the game. Possible project for a class/group in either 729 – design and evaluate class (Komlodi) or 728 – Online Communities & Social Media (Branham)

Phil 9.5.17

7:00 – 4:00 ASRC IRAD

  • Read some more Understanding Ignorance. He hasn’t talked about it, but it makes me look at game theory in a different way. GT is about making decisions with incomplete information. Ignorance results in decisions made using no or incorrect information. This is a modellable condition, and should result in observable results. Maybe something about output behaviors not mapping (at all? statistically equal to chance or worse?) to input information.
  • Heat maps!!!! 2017-09-05
  • Playing around with the drawing so we’re working off of a white background. Not sure if it’s better?
  • Adding a decay factor so new patterns don’t get overwhelmed by old ones 0.999 seems to be pretty good.
  • Need to export to excel – Done!2017-09-06
  • Advanced Analytic Status meeting.
  • NOAA meeting. Looks like they want VISIBILITY. Need to write up scenarios from spreadsheet generation to complete integration from allocation to contract to deliverable. With dashboards.
  • Latest version of the heatmaps, This produced the excel sheets above (dbTest_09_06_17-07_01_51) Going to leave it like this while I write the paper: 2017-09-06 (1)

Phil 8.18.17

7:00 – 8:00 Research

  • Got indexFromLocation() working. It took some fooling around with Excel. Here’s the method:
    public int[] indexFromLocation(double[] loc){
        int[] index = new int[loc.length];
        for(int i = 0; i < loc.length; ++i){
            double findex = loc[i]/mappingStep;
            double roundDown = Math.floor(findex);
            double roundUp = Math.ceil(findex);
            double lowdiff = findex - roundDown;
            double highdiff = roundUp - findex;
            if(lowdiff < highdiff){
                index[i] = (int)roundDown;
                index[i] = (int)roundUp;
        return index;
  • And here are the much cleaner results:
    • [0.00, 0.00] = [0, 0]
      [0.00, 0.10] = [0, 0]
      [0.00, 0.20] = [0, 1]
      [0.00, 0.30] = [0, 1]
      [0.00, 0.40] = [0, 2]
      [0.00, 0.50] = [0, 2]
      [0.00, 0.60] = [0, 2]
      [0.00, 0.70] = [0, 3]
      [0.00, 0.80] = [0, 3]
      [0.00, 0.90] = [0, 4]
      [0.00, 1.00] = [0, 4]

      [1.00, 0.00] = [4, 0]
      [1.00, 0.10] = [4, 0]
      [1.00, 0.20] = [4, 1]
      [1.00, 0.30] = [4, 1]
      [1.00, 0.40] = [4, 2]
      [1.00, 0.50] = [4, 2]
      [1.00, 0.60] = [4, 2]
      [1.00, 0.70] = [4, 3]
      [1.00, 0.80] = [4, 3]
      [1.00, 0.90] = [4, 4]
      [1.00, 1.00] = [4, 4]
  • Another thought that struck me as far as the (int) constraint is that I can have a number of ArrayLists that are embedded in a an object that has the first and last index in it. These would be linked together to provide unconstrained (MAX_VALUE or 2,147,483,647 lists) storage

8:30 – 4:30 BRI

  • I realized yesterday that the Ingest and Query microservices need to access the same GeoMesa Spring service. That keeps all the general store/query GeoMesa access code in one place, simplifies testing and allows for DI to provide the correct (hbase, accumulo, etc) implementation through a facade interface.
  • Got tangled up with getting classpaths right and importing the proper libraries
  • Got the maven files behaving, or at least not complaining on mvn clean and mvn compile!
  • Well that’s a new error: Error: Could not create the Java Virtual Machine. I get that running the new installation with the geomesa-quickstart-hbase
    • Ah, that’s what will happen when you paste your command-line arguments into the VM arguments space just above where it should go…
    • Wednesday’s goal will to verify that HBaseQuickStart is running correctly in its new home and start to turn it into a service.

Phil 8.17.17

BRI – one hour chasing down research hours from Jan – May

7:00 – 6:00 Research

  • Found this on negative flocking influences: The rise of negative partisanship and the nationalization of US elections in the 21st century.  Paper saved to Lit Review
    • One of the most important developments affecting electoral competition in the United States has been the increasingly partisan behavior of the American electorate. Yet more voters than ever claim to be independents. We argue that the explanation for these seemingly contradictory trends is the rise of negative partisanship. Using data from the American National Election Studies, we show that as partisan identities have become more closely aligned with social, cultural and ideological divisions in American society, party supporters including leaning independents have developed increasingly negative feelings about the opposing party and its candidates. This has led to dramatic increases in party loyalty and straight-ticket voting, a steep decline in the advantage of incumbency and growing consistency between the results of presidential elections and the results of House, Senate and even state legislative elections. The rise of negative partisanship has had profound consequences for electoral competition, democratic representation and governance.
  • Working on putting together an indexable high-dimension matrix that can contain objects. Generally, I’d expect it to be doubles, but I can see Strings and Objects as well.
  • Starting off by seeing what’s in the newest Apache Commons Math (v 3.6.1)
  • Found SimpleTensor, which uses the Efficient Java Matrix Library (EJML) and creates a 3D block of rows, columns and slices. THought it was what I wanted, but nope
  • Looks like there isn’t a class that would do what I need to do, or that I can even modify. I’m thinking that the best option is to use org.apache.commons.math3.linear.AbstractRealMatrix as a template.
  • Nope, coudn’t figure out how to do things as nested lists. So I’m doing it C-Style, where you really only have one array that you index into. Here’s a 4x4x4x4 Tensor filled with zeroes:
    Total elements = 256
    0.0:[0, 0, 0, 0], 0.0:[1, 0, 0, 0], 0.0:[2, 0, 0, 0], 0.0:[3, 0, 0, 0],
    0.0:[0, 1, 0, 0], 0.0:[1, 1, 0, 0], 0.0:[2, 1, 0, 0], 0.0:[3, 1, 0, 0],
    0.0:[0, 2, 0, 0], 0.0:[1, 2, 0, 0], 0.0:[2, 2, 0, 0], 0.0:[3, 2, 0, 0],
    0.0:[0, 3, 0, 0], 0.0:[1, 3, 0, 0], 0.0:[2, 3, 0, 0], 0.0:[3, 3, 0, 0],
    0.0:[0, 0, 1, 0], 0.0:[1, 0, 1, 0], 0.0:[2, 0, 1, 0], 0.0:[3, 0, 1, 0],
    0.0:[0, 2, 3, 3], 0.0:[1, 2, 3, 3], 0.0:[2, 2, 3, 3], 0.0:[3, 2, 3, 3],
    0.0:[0, 3, 3, 3], 0.0:[1, 3, 3, 3], 0.0:[2, 3, 3, 3], 0.0:[3, 3, 3, 3]
  • The only issue that I currently have is that ArrayLists are indexed by int, so the total size is 32k elements. That should be good enough for now, but it will need to be fixed.
  • set() and get() work nicely:
    lt.set(new int[]{0, 1, 0, 0}, 9.9);
    lt.set(new int[]{3, 3, 3, 3}, 3.3);
    System.out.println("[0, 1, 0, 0] = " + lt.get(new int[]{0, 1, 0, 0}));
    System.out.println("[3, 3, 3, 3] = " + lt.get(new int[]{3, 3, 3, 3}));
    [0, 1, 0, 0] = 9.9
    [3, 3, 3, 3] = 3.3
  • Started the indexFromLocation method, but this is too sloppy:
    index[i] = (int)Math.floor(Math.round(loc[i]/mappingStep));

Phil 8.16.17

7:00 – 8:00 Research

  • Added takeaway thoughts to my C&C writeup.
  • Working out how to add capability to the sim for P&RCH paper. My thoughts from vacation:
    • The agents contribution is the heading and speed
    • The UI is what the agent’s can ‘see’
    • The IR is what is available to be seen
    • An additional part might be to add the ability to store data in the space. Then the behavior of the IR (e.g. empty areas) would b more apparent, as would the effects of UI (only certain data is visible, or maybe only nearby data is visible) Data could be a vector field in Hilbert space, and visualized as color.
  • Updated IntelliJ
  • Working out how to to have a voxel space for the agents to move through that can also be drawn. It’s any number of dimensions, but it has to project to 2D. In the case of the agents, I just choose the first two axis. Each agent has an array of statements that are assembled into a belief vector. The space can be an array of beliefs. Are these just constructed so that they fill a space according to a set of rules? Then the xDimensionName and yDimensionName axis would go from (0, 1), which would scale to stage size? IR would still be a matter of comparing the space to the agent’s vector. Hmm.
  • This looks really good from an information horizon perspective: The Role of the Information Environment in Partisan Voting
    • Voters are often highly dependent on partisanship to structure their preferences toward political candidates and policy proposals. What conditions enable partisan cues to “dominate” public opinion? Here I theorize that variation in voters’ reliance on partisanship results, in part, from the opportunities their environment provides to learn about politics. A conjoint experiment and an observational study of voting in congressional elections both support the expectation that more detailed information environments reduce the role of partisanship in candidate choice

9:00 – 5:00 BRI

  • Good lord, the BoA corporate card comes with SIX seperate documents to read.
  • Onward to Chapter Three and Spring database interaction
  • Well that’s pretty clean. I do like the JdbcTemplate behaviors. Not sure I like the way you specify the values passed to the query, but I can’t think of anything better if you have more than one argument:
    public class EmployeeDaoImpl implements EmployeeDao {
        private DataSource dataSource;
        private JdbcTemplate jdbcTemplate;
        private RowMapper<Employee> employeeRowMapper = new RowMapper<Employee>() {
            public Employee mapRow(ResultSet rs, int i) throws SQLException {
                Employee employee = new EmployeeImpl();
                employee.setEmployeeName(rs.getString("FirstName") + " " + rs.getString("LastName"));
                return employee;
        public Employee getEmployeeById(int id) {
            Employee employee = null;
            employee = jdbcTemplate.queryForObject(
                    "select * from Employee where id = ?",
                    new Object[]{id},
            return employee;
        public List<Employee> getAllEmployees() {
            List<Employee> eList = jdbcTemplate.query(
                    "select * from Employee",
            return eList;
  • Here’s the xml to wire the thing up:
    <context:component-scan base-package="org.springframework.chapter3.dao"/>
    <bean id="employeeDao" class="org.springframework.chapter3.dao.EmployeeDaoImpl"/>
    <bean id="dataSource"
        <property name="driverClassName" value="${jdbc.driverClassName}" />
        <property name="url" value="${jdbc.url}" />
        <property name="username" value="xxx"/>
        <property name="password" value="yyy"/>
    <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
        <property name="dataSource" ref="dataSource" />
    <context:property-placeholder location="" />
  • And here’s the properties. Note that I had to disable SSL: