E-Book, Englisch, 370 Seiten
Wayner Agents Unleashed
1. Auflage 2014
ISBN: 978-1-4832-1436-8
Verlag: Elsevier Science & Techn.
Format: EPUB
Kopierschutz: 6 - ePub Watermark
A Public Domain Look at Agent Technology
E-Book, Englisch, 370 Seiten
ISBN: 978-1-4832-1436-8
Verlag: Elsevier Science & Techn.
Format: EPUB
Kopierschutz: 6 - ePub Watermark
Peter Wayner is a writer living in Baltimore and is the author of Digital Cash and Agents at Large (both Academic Press). His writings appear in numerous academic journals as well as the pages of more popular forums such as MacWorld and the New York Times. He has taught various computer science courses at Cornell University and Georgetown University.
Autoren/Hrsg.
Weitere Infos & Material
1;Front Cover;1
2;Agents Unleashed: A Public Domain Look at Agent Technology;4
3;Copyright Page;5
4;Table of Contents;6
5;Preface;12
6;Book Notes;13
7;Chapter 1.
Off the Coast of Cannes;14
8;Chapter 2. Why
Agents;20
8.1;2.1 What Is an
Agent;22
8.2;2.2 Why
Agents;25
8.3;2.3 The Underlying Technology;29
8.4;2.4 The Goal of this Book;32
8.5;2.5 How To Read this Book;33
9;Chapter 3. A Basic Agent;36
9.1;3.1 A LISP Agent;39
9.2;3.2 An Airline System;42
9.3;3.3 Summary;45
10;Chapter 4. A Basic Host;46
10.1;4.1 The Execution Unit;50
10.2;4.2 Optional Host Features;53
10.3;4.3 A Sample Host;54
10.4;4.4 Summary;62
11;Chapter 5. Errors;64
11.1;5.1 Error Messages;66
11.2;5.2 Bad Agent Expulsion;72
11.3;5.3 Errors in XLISP-Agents;73
11.4;5.4 Summary;77
12;Chapter 6. Going Out;80
13;Chapter 7. Local Personalities;84
13.1;7.1 Function Simulators;86
13.2;7.2 Error Simulators;87
13.3;7.3 Resource Simulators;88
14;Chapter 8. Resources;90
14.1;8.1 Paying the Piper;94
14.2;8.2 Negotiation;95
14.3;8.3 Host Code Details;99
14.4;8.4 Agent Code Details;105
14.5;8.5 Summary;108
15;Chapter 9. Agent Language;110
15.1;9.1 Design Goals;113
15.2;9.2 Memory Management;115
15.3;9.3 Dynamic Binding;116
15.4;9.4 Goodbye Pointers;118
15.5;9.5 Soft Crash Landings;118
15.6;9.6 Type Checking and Polymorphism;119
15.7;9.7 Why Interpret the
Language;120
15.8;9.8 Summary;122
16;Chapter 10. XLISP;124
16.1;10.1 Interpret or
Compile;126
16.2;10.2 What is
LISP;127
16.3;10.3 Modifying XLISP;131
16.4;10.4 Using Evalhook and Applyhook;132
16.5;10.5 Watching the Clock;133
16.6;10.6 Watching for Trouble;136
16.7;10.7 Summary;150
17;Chapter 11. TCL;152
17.1;11.1 TCL: The language;155
17.2;11.2 String Manipulation;159
17.3;11.3 Arithmetic;162
17.4;11.4 Lists;164
17.5;11.5 Control Structure;166
17.6;11.6 Procedures;168
17.7;11.7 Summary;170
18;Chapter 12. Safe-TCL;174
18.1;12.1 MIME Time;175
18.2;12.2 Deconstructing TCL;177
18.3;12.3 Two Interpreters;183
18.4;12.4 In with the New;184
18.5;12.5 Safe-TCL Extensions;185
18.6;12.6 User Interaction;190
18.7;12.7 Safe-Tk;192
18.8;12.8 Plugging More Holes;193
18.9;12.9 Summary;194
19;Chapter 13. Other Languages;196
19.1;13.1 Telescript;197
19.2;13.2 Python;201
19.3;13.3 Smalltalk;204
19.4;13.4 Nextstep, DSOM and Object Systems;206
19.5;13.5 Summary;207
20;Chapter 14. Security and Encryption;208
20.1;14.1 The Basics of Cryptography;209
20.2;14.2 DES and IDEA;215
20.3;14.3 RSA;222
20.4;14.4 MD-4, MD-5 and SHA;227
20.5;14.5 Digital Signature Standard;230
20.6;14.6 More Signature Schemes;232
20.7;14.7 PGP 2.6.1;236
20.8;14.8 Adapting PGP for Agents;242
20.9;14.9 Royalties;243
20.10;14.10 Judging Security;243
20.11;14.11
Summary;244
21;Chapter 15. Cash;246
21.1;15.1 Digital Cashier's Checks;248
21.2;15.2 Endorsed Digital Cashier's Checks;250
21.3;15.3 Blinded Signatures;252
21.4;15.4 Simple Anonymous Cash;253
21.5;15.5 Secret Sharing;256
21.6;15.6 Traceable Anonymous Cash;259
21.7;15.7 Cash without Choices;263
21.8;15.8 Summary;267
22;Chapter 16. Commercial Cash;270
22.1;16.1 NetCash;271
22.2;16.2 First Virtual;274
22.3;16.3 DigiCash;277
22.4;16.4 CommerceNet;277
22.5;16.5 Conclusions;279
23;Chapter 17. Going Deeper;282
23.1;17.1 Emotional Agents;283
23.2;17.2 Matters of Taste;286
23.3;17.3 Negotiation;287
23.4;17.4 Conclusion;289
24;Chapter 18. Experimenting;290
24.1;18.1 XLISP Agents;291
24.2;18.2 Safe-TCL Agents;292
24.3;18.3 LOADER.LSP;293
24.4;18.4 AIRAGENT.LSP;295
24.5;18.5 AIRHOST.LSP;300
24.6;18.6 CORE.LSP;312
25;Chapter 19. Back to the Future;322
26;Chapter 20. Glossary;336
27;Chapter 21. Sources;342
27.1;21.1 Language FTP Sources;343
27.2;21.2 Cryptography FTP Sources;344
27.3;21.3 Other FTP Sources;345
27.4;21.4 Mosaic and WWW Pages;345
27.5;21.5 Newsgroups;348
27.6;21.6 Other Sources;349
28;Chapter 22. Index;364
A Basic Agent
Publisher Summary
This chapter presents a basic structure for an agent. An agent should be able to negotiate for resources, trade the right resources, initialize itself, run through its interaction with the host, and deal with errors. It should do all of this without overstepping its bounds at a host. There is not much more to an agent. Although there are many different ways that the resource negotiation process can be extended, and many better ways to add standard functionality to a host, there are not many ways to extend an agent. This is largely because an agent is just a program that interacts with a host. Future definitions might add more structure for popular types of agents. There might be basic agents that come with the ability to pay a fixed amount for a service. Others might be constructed that go to one place and return. Standard types like this might emerge if people begin to use the agent systems frequently.
The Hype
.
Political Cynicism
.
The Buzzwords
.
Ideally, an agent will be all things to all people. This is is a great dream that will never be realized with the current nature of computer intelligence. In reality, agents will be able to be programmed to do anything that computers can do. This means there are the natural limits that constrain any machine-based intelligence, but these bounds can be quite large.
What constitutes an agent? This question rings with the self-reflection that occurs in everyone’s Hamlet period. The deep philosophical meaning of this question is fun to ask in a late-night cafe when you’re smoking clove cigarettes, but it is best to forget about this glitzy anthropomorphism during the light of day and realize that agents are just programs. They do exactly what they are told to do and nothing more.
Agents may be programs, but they are programs with several additional features. They must be able to negotiate the network and ask for permission for everything they do. They must be ready to prove who they are and show that they have the authority to act for their masters. Upon arrival, they must be ready to negotiate credit for the host’s services and, in the event that credit isn’t available, the agent must be able to pay up front. Digitized chocolates or bottles of wine won’t cut it.
Here are some elements that make up an agent:
StateThe agent must bring the state of all of the important variables and constants along with itself. This must be bundled in one list.
FunctionsThese are all of the functions built into the agent. This is what it knows how to do.
Initialization FunctionsThese are the routines or functions that must be run when the agent first arrives at the host.
Main FunctionThis is the main function to be called upon arrival. It is equivalent to the main function in a C program.
Cleanup FunctionsWhat is done at the end to complete the exchange. These functions must package the agent and send it to its next destination.
AuthorizationWho sent the agent? Under whose authority does it operate? Who gets the bill?
Return AddressWhere will the results go? Where will reports about errors go?
Spending LimitsHow much computational time can the agent spend? How much money? How many other computational resources can it consume?
Cash SupplyWhat if the agent must pay to play? If credit isn’t available, then the agent needs to be able to offer something to the host.
This list of the major elements that constitute a computer-based, network-ready digital agent is not necessarily complete. Some agents might carry multimedia presentations with them to be offered to someone on the Net. Other agents might carry digital representations of contracts for negotiation with a host. The implementation of Safe-TCL, described in Chapter 12, includes functions for displaying information on the screen and interacting with the user so it can offer some smart mail. There are thousands of possible uses for agents that require different functions and capabilities. For now, these details are left as part of the initialization and main functions built into the agent. This book will concentrate on the technical details of how an agent will move through the network, prove its identity and execute its code without endangering the host.
Which language should be used? Any language could be used to assemble all of these elements in some shape or fashion, but some are better than others. Some offer good ways to segregate the information owned by the agent from the information and the files owned by the host. Some suffer the restriction brought about by this partition with more style because they were designed to help the programmer by constraining their access to the data. An overview of the issues of designing a language are given in Chapter 9. The rest of this chapter will concentrate on introducing a LISP-based example for a basic agent.
3.1 A LISP Agent
LISP is an easy language to use to build an agent because there are a number of built-in functions that are quite flexible and tuned to the process of maintaining lists of objects with embedded functionality.
The basic LISP agent will be a text file that will be evaluated when it arrives. The file can contain almost anything, but it must define certain required variables and functions. Each of these items will begin with the prefix FA to make their heritage clear. The required variables and functions are:
FA-Resource-Requests Which resources the agent will demand.
FA-Return-Address Where to send the final state if it doesn’t go somewhere else.
FA-Agent-Identity This contains the identity of the agent. The fields in this structure include owner, date of birth, serial number, mission statement, and open fields for digital signatures.
FA-Error-Function error-type] What to do if there is an error.
FA-Resource-Negotiator This is executed before the main function to arrange for the right resources. If it does not succeed, then the FA-Main-Function won’t run.
FA-Initialization-Function This runs at the beginning of the operation.
FA-Main-Function This is the main function. It must initialize what needs to be initialized, do the work and clean up at the end.
FA-Clean-Up-Function This runs when the main function terminates. It should be responsible for packing everything up and sending it to the correct destination.
FA-Report-Me-In-Errors This is a list of variables that should be mailed back to the owner in the event of an unrecoverable error. It is useful for debugging and is discussed in depth in Chapter 5.
FA-Burn-Some-Cycles This function is used only in the local debugging process. It will calculate for a fixed amount of computation for the purposes of debugging an agent before it leaves for the host.
FA-State-Info What the agent considers important. These are what will be packed up and moved with the agent.
The LISP file is evaluated upon arrival. Then the host executes FA–Initialization-Function, FA-Resource-Negotiator, FA-Main-Function and FA-Clean-Up-Function, in that order. Figure 3.1 shows the execution progression. Although all of these could be compressed into one function call, they are kept separate at this time to allow for future expansion. It may be desirable to create a type of resident agent that arrives at a host and sets up shop. The main function, in that case, will be executed every time the agent should be activated. The initialization and clean-up functions are only used to set up the state when it arrives.
Figure 3.1 The execution flowchart of what happens to a basic agent when it arrives at a host.
The details of the resource negotiation process are discussed in Chapter 8. The resource negotiator is responsible for making sure that the FA–Main-Function will have everything available for it to run. In almost all cases, this will be a trivial exercise. People will know what they want their agent to get when it goes to a location and they will make sure it has the cash or whatever resources are necessarty to pay for it. The more complicated resource negotiation procedure described in Chapter 8 is...




