forked from opencog/opencog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImprintAgent.h
90 lines (71 loc) · 2.31 KB
/
ImprintAgent.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
* examples/hopfield/ImprintAgent.h
*
* Copyright (C) 2008 by Singularity Institute for Artificial Intelligence
* Written by Joel Pitt <[email protected]>
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License v3 as
* published by the Free Software Foundation and including the exceptions
* at http://opencog.org/wiki/Licenses
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program; if not, write to:
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _OPENCOG_IMPRINT_AGENT_H
#define _OPENCOG_IMPRINT_AGENT_H
#include <string>
#include <opencog/atomspace/AtomSpace.h>
#include <opencog/truthvalue/AttentionValue.h>
#include <opencog/cogserver/server/Agent.h>
#include <opencog/util/Logger.h>
#include "Pattern.h"
namespace opencog
{
class CogServer;
/** Agent that imprints Patterns on to the perceptual nodes of the Hopfield
* network.
*/
class ImprintAgent : public Agent
{
public:
typedef std::vector< std::vector<float> > w_t;
private:
bool verbose;
/** Set the agent's logger object
*
* Note, this will be deleted when this agent is.
*
* @param l The logger to associate with the agent.
*/
void setLogger(Logger* l);
Logger *log; //!< Logger object for Agent
Pattern epsilon; //!< Pattern for imprinting on the network
public:
virtual const ClassInfo& classinfo() const { return info(); }
static const ClassInfo& info() {
static const ClassInfo _ci("opencog::ImprintAgent");
return _ci;
}
ImprintAgent(CogServer&);
virtual ~ImprintAgent();
virtual void run();
/** Return the agent's logger object
*
* @return A logger object.
*/
Logger* getLogger();
//! Set pattern to imprint when Agent runs
void setPattern(Pattern _epsilon);
}; // class
typedef std::shared_ptr<ImprintAgent> ImprintAgentPtr;
} // namespace
#endif // _OPENCOG_IMPRINT_AGENT_H