Tuesday, July 21, 2009

Android audio formats - converting to mp3

So Android support recording of audio in the 3GPP/AMR format, however it seems that there is no built in support for conversion to mp3 which is what I need to be able to upload audio to a web service I am working with.

Apparently we can extract the AMR core from a 3GPP file but it seems I need some audio conversion library ...

One way round this might be to upload the file to another service that could do the conversion. There are various online conversion services, but I can't seem to find one that will do 3gpp to mp3.

I had also thought that there might be something in the android marketplace (and then I could outsource the conversion but still run it on the device), and there is one app, but it has a lot of reviews suggesting it does not work and may even be a virus.

There appear to be some people who have succeeded in porting ffmpeg to android:


However, so far I have failed to even get ffmpeg to work from the command line with files extracting from the android simulator:


ffmpeg is open source, but I am not sure how to deploy code other than java to android.

So I guess I am going to give up on uploading audio from android and see if I can get images uploaded, and come back to this after I have some more input ..

Thursday, July 2, 2009

Sen et al (2007) Learning to Identify Beneficial Partners

Cited by 4 [ATGSATOP]

So this is another paper in my attempt to finish the background reading for an invited paper in the AP2PC'07 workshop proceedings.  I believe I found this one following a citation trail from Ben-Ami and Shehory (2007) and I think I grabbed it because it had "learning" in the title.  Peer to Peer is mentioned in passing, but this paper is really about a multi-agent system where individual agents have learning capabilities.  I know the first author from a panel session in AP2PC'05, so that is another connection, but I can't really remember if I had some more complex motivation for printing out this particular paper last October.

In principle I am reading this to help illuminate some of the ways that agent research can be of benefit to P2P researchers, but there is a part of me that is just interested in mathematical and algorithmic characterizations of "learning".  The paper itself introduces parallels between human and artificial agents trying to make critical choices about interaction partners; and this makes me think of the human interaction analogies in Ian Clarkes Masters thesis on Freenet, my own intuitions about pruning search in my NeuroGrid system, as well as the agent modelling in the paper I co-authored with Ben Tse and Raman Paranjape.  We are all humans and we interact with other humans most days, and so I guess it is no surprise that this sort of analogy crops up again and again; however I think there is a pitfall here.  Sometimes the analogies breakdown and our intuitions lead us astray - I think this is the case with mobile agents where our human experience of the greater efficiency of human face to face interaction suggests that sending a mobile agent across a network should be more efficient than static agents communicating with each other when in fact it is difficult to predict the relative efficiency of the two methods for mobile agents (Joseph & Kawamura, 2001).

The goal of the authors research is to try and discover which learning schemes will sustain mutually beneficial partnerships between agents.  Apparently algorithms which achieve equilibria in repeated play have so far been restricted to two-player situations.  This paper examines a population of agents that learn through the reinforcement technique of Q-learning (Watkins & Dayan, 1992).  The authors restrict their system to one where agents search through repetitive personal interaction; not through referral.

In the authors system each agent is of a particular type, and has preferences to interact with agents of other types.  Thus the potential reward that agents achieve through interacting with each other is a matrix of agents against types; and the matrix is designed such that some optimal solution of agent partnerships exists where no agent can get a greater reward by switching to interact with other agents.  Since the matrix of rewards is unknown to the agents, the Q-learning technique is used to update agents estimates of the rewards of interacting with each other.  Q-learning updates estimates through a combination of earlier experiences of reward with the current experience.  The extent to which experience influences current estimates is not varied, and the alpha parameter that determines this is not mentioned again in the paper, making a replication difficult.  However, in order to vary the agents level of explorative behaviour, i.e. the extent to which agents try out new interactions, the authors adjust the probability with which the agents select a random agent to interact with, rather than the one recommended by the Q-learning estimate.  By adjusting this probability over time exploratory behaviour is gradually reduced in what seems like a sort of simulated annealing.

No particular justification is given for the particular parameter settings or the approach used, leading me to wonder what the basis for this approach is.  Are these techniques similar to others in the literature, or are they based on any empirical observations of real-world phenomena?  Nonetheless, initial simulation results in a static environment show that a slow decay of exploratory behaviour is associated with the system taking longer to achieve equilibrium, but also with a higher final average payoff for the agents.  This certainly makes intuitive sense.

In subsequent simulations dynamic environments are explored where agents die off and are replaced if they fail to achieve a sufficiently high payoff within a certain timeframe.  As the environment becomes tougher and agents are killed off more quickly it takes longer and longer for the system to reach a stable equilibrium, although this can be mitigated by reducing the level of exploratory behaviour (see figure d is rate at which exploratory behaviour decays).  Again this makes intuitive sense.

In further simulations we see that protecting young agents can also help the system achieve equilibrium sooner, which also makes intuitive sense, and makes me think of the use of karma in online communities; or at least the way that new users will be given an initial chunk of reward or karma points.  Not sure how strong the parallel is here, but I guess you could model an online community in terms of multi-agents looking for beneficial interactions.  New users are entering the community at a certain rate, and not hanging around indefinitely.  They will need to have positive interactions within a certain time period before they will effectively remove themselves from the community; which makes me think of that paper that shows the effect of existing social network patterns on incoming users (wasn't it something to do with closed triangular relations) - should re-read that for my thesis project, if I can find it (probably in disCourse somewhere).

In a final section the authors experiment with introducing noise and we see that noise can have a similar effect to prolonging exploratory behaviour, i.e. taking longer to get to equilibrium, but perhaps finding a higher optimum.  My main concern with all this is the relationship to the real world where systems may spend much of their time away form equilibrium.  I see connections to other work that I have done on the evolution of intelligence (where we compared our models with populations of animals in the real world) and online communities, but a lot of the modeling decisions seem to be soewhat arbitrary.  It would be nice to know what was motivating them.

My references:

Joseph S. & Kawamura T. (2001) Why Autonomy Makes the Agent. In Agent Engineering, Eds. Liu, J, Zhong, N, Tang, Y.Y. and Wang P. World, Scientific Publishing.

ResearchBlogging.orgSandip Sen, Anil Gursel, & Stephane Airiau (2007). Learning to identify beneficial partners Working Notes of the Adaptive and Learning Agents Workshop at AAMAS

Wednesday, July 1, 2009

Ben-Ami & Shehory (2005) A Comparative Evaluation of Agent Location Mechanisms in Large Scale MAS

Cited by 3 [ATGSATOP]

So this was one of the papers I printed out last year since it cited Koubarakis (2003), and am reading as part of trying to put together an invited paper for the AP2PC 2007 workshop proceedings. Putting together the proceedings and the invited paper has been a somewhat ill fated process interrupted by the death of my father, the collapse of the industry grant that was funding my position at University of Hawaii, and the birth of my twin sons! I am back on track now, although new crises loom on the horizon I am actually making some progress reading all the papers I printed out last October (Sycara, 1998; Sycara, 1991; Rosenschein, 1993; Koubarakis, 2003). If I can just hang in there I can wrap this thing up by the end of the summer - fingers crossed.

So after reading this paper I think I probably should have been reading Shehory (2000) which describes the distributed agent location mechanism that this paper is evaluating in comparison with centralized location mechanisms. However this is the one I had printed out, so partly not to waste the paper, and also because it is easier to read paper papers when pushing the twin stroller around I am sticking with this. It also reflects my earlier literature searching tendencies to print out things that look interesting without necessarily doing sufficient investigation to find the critical highly-cited papers in a particular domain; but enough of that.

This paper was presented at AAMAS 2005, which I attended. It describes a number of problems associated with centralized location services
the middle agent that supplies the directory services becomes one of the system failure points and/or communication bottlenecks
although no academic or industry systems are cited. I get the feeling that the problems described are based on observations of toy systems and simulations rather than on experience with really large scale systems. I may be wrong, but the paper is not really providing me re-assurance to the contrary. The paper mentions the P2P approach, but only the flooding model is considered rather than anything more sophisticated like a distributed hashtable (DHT) although this is understandable given the year of publication. Compared to simulations of P2P systems, the testing of simply random and grid networks seems a little overly simplistic. Furthermore the efforts at generalizability are restricted to a fixed number of repeat runs rather than an assessment of the number of runs needed to achieve a particular confidence level. Of course the same criticism could be leveled at most P2P simulation studies.

The main conclusions of the paper are as follows:
  1. the response time of a distributed location mechanism is significantly better than the response time of a centralized one, in particular for large scale MAS (see fig 1 above). This result does not hold, however, in capability-deprived MAS, where a centralized mechanism will perform better.
  2. it is evident that a centralized location mechanism is very sensitive to workloads. At a medium to high load, in particular in large MAS, the centralized mechanism will perform poorly, whereas the distributed one will hardly be affected.
  3. the advantages of the distributed solution do come at the cost of a communication overhead
Although it feels like these follow logically from the definition of distributed and centralized location systems. It is not clear that we necessarily need simulations to confirm these assertions. So overall I don't come away thinking that P2P researchers would find much of interest in this paper, except in so far as to see the parallel concepts in the two fields, but I have to concede that this may be the right paper for some agents researchers to read in order to see the applicability of the P2P approach. So let us say that I was slightly disappointed by the level of this paper, but it would be unfair to judge the potential contribution of agents to P2P based on this one paper, and I think my overall opinion is turning. It might be helped by reading Shehory (2000), but right now I am going to forge on with the other papers I have printed out.

David Ben-Ami, & Onn Shehory (2005). A comparative evaluation of agent location mechanisms in large scale MAS Proceedings of the fourth international joint conference on Autonomous agents and multiagent systems, 339-346 DOI: 10.1145/1082473.1082525

Barabasi, A. L., Albert, R., "Emergence of Scaling in Random Networks" (Cited by 6145). Science, page 286(509), 1999.
David Ben-Ami, Onn Shehory, "Evaluation of Distributed and Centralized Agent Location Mechanisms", Proceedings of the 6th International Workshop on Cooperative Information Agents VI, p.264-278, September 18-20, 2002
Clarke I., Sandberg O., Wiley B., Hong T. W., "Freenet: A Distributed Anonymous Information Storage and Retrieval System" (Cited by 1760). Proceedings of the ICSI Workshop on Design Issues in Anonymity and Unobservability. Berkeley, CA, 2000.
Decker K., Sycara K., Williamson M. "Middle-Agents for the Internet" (Cited by 398) .Proceedings of IJCAI-97, pages 578--583, Nagoya Japan 1997.
Dimakopoulos V. V., Pitoura E., "A Peer-to-Peer Approach to Resource Discovery in Multi-agent Systems" (Cited by 13). Proceedings of. CIA 2003: pages 62--77.
Michael R. Genesereth, Steven P. Ketchpel, Software agents, Communications of the ACM, v.37 n.7, p.48-ff., July 1994
Gibbins, N. and Hall, W. "Scalability Issues for Query Routing Service Discovery" (Cited by 19). Proceedings of the Second Workshop on Infrastructure for Agents, MAS and Scalable MAS (2001), pages 209--217.
Adriana Iamnitchi, Ian Foster, Daniel C. Nurmi, "A Peer-to-Peer Approach to Resource Location in Grid Environments", Proceedings of the 11 th IEEE International Symposium on High Performance Distributed Computing HPDC-11 20002 (HPDC'02), p.419, July 24-26, 2002
Somesh Jha, Prasad Chalasani, Onn Shehory, Katia Sycara, "A formal treatment of distributed matchmaking" (poster), Proceedings of the second international conference on Autonomous agents, p.457-458, May 10-13, 1998, Minneapolis, Minnesota, United States
Koubarakis M., "Multi-agent Systems and Peer-to-Peer Computing: Methods, Systems, and Challenges" (Cited by 12). Proceedings of. CIA 2003 pages 46--61.
Kuokka D., Harada L., "Matchmaking for information agents" (Cited by 100). Proceedings of IJCAI-95, pages 672--679, 1995.
Elth Ogston, Stamatis Vassiliadis, "Matchmaking among minimal agents without a facilitator", Proceedings of the fifth international conference on Autonomous agents, p.608-615, May 2001, Montreal, Quebec, Canada
Onn Shehory, A Scalable Agent Location Mechanism, 6th International Workshop on Intelligent Agents VI, Agent Theories, Architectures, and Languages (ATAL),, p.162-172, July 15-17, 1999
Smithson A., Moreau L., "Engineering an Agent-Based Peer-To-Peer Resource Discovery System" (Cited by 3). In Gianluca Moro and Manolis Koubarakis, editors, First International Workshop on Agents and Peer-to-Peer Computing, pages 69--80, Bologna, Italy, July 2002.
Srinivasan N. et al., "Enabling Peer-to-Peer Resource Discovery in Agent Environment" (Cited by 1). Proceedings of Challenges in Open Agent Systems (AAMAS 2002), July 2002.
Stoica I., Morris R., Karger D., Kasshoek M. F., Balakrishnan H., "Chord: A scalable peer-to-peer lookup service for Internet Applications" (Cited by 6651). Technical Report TR-819, MIT, March 2001.
Vitaglione G., Quarta F. and Cortese E., "Scalability and Performance of JADE Message Transport System" (Cited by 38). Proceedings of the AAMAS Workshop on AgentCities, Bologna, 2002.
Watts, D. J., Strogatz, S. H, "Collective Dynamics of 'Small World' Networks" (Cited by 7766). Nature, 393: pages 440--442, 1998.
A Taxonomy of Middle-Agents for the Internet, Proceedings of the Fourth International Conference on MultiAgent Systems (ICMAS-2000), p.465, July 10-12, 2000
Yolum P., Singh M. P., "An Agent-Based Approach for Trustworthy Service Location" (Cited by 13). Proceedings of the 1st International Workshop on Agents and Peer-to-Peer Computing, Bologna, Italy 2002.
Bin Yu, Munindar P. Singh, "A Social Mechanism of Reputation Management in Electronic Communities", Proceedings of the 4th International Workshop on Cooperative Information Agents IV, The Future of Information Agents in Cyberspace, p.154-165, July 07-09, 2000